Enable build on Mac OS X with clang
* Add build target 'darwin' * Modify compiler options to work with clang * Support 'jerry-libc' on Mac OS X For MPU target build, install `gcc-arm-none-eabi` tool chain using `Homebrew` as following. ```` brew tap PX4/homebrew-px4 brew update brew install gcc-arm-none-eabi ```` https://pixhawk.org/dev/toolchain_installation_mac JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
This commit is contained in:
@@ -40,6 +40,8 @@ set(COMPILE_FLAGS_LIBC "${COMPILE_FLAGS_JERRY} ${C_FLAGS_JERRY}")
|
||||
# Platform-specific
|
||||
# Linux
|
||||
set(DEFINES_LIBC_LINUX __TARGET_HOST)
|
||||
# Darwin
|
||||
set(DEFINES_LIBC_DARWIN __TARGET_HOST)
|
||||
# MCU
|
||||
set(DEFINES_LIBC_MCU __TARGET_MCU)
|
||||
# stm32f3
|
||||
@@ -57,6 +59,9 @@ set(COMPILE_FLAGS_LIBC "${COMPILE_FLAGS_JERRY} ${C_FLAGS_JERRY}")
|
||||
# Linux
|
||||
set(INCLUDE_THIRD_PARTY_LINUX )
|
||||
|
||||
# Darwin
|
||||
set(INCLUDE_THIRD_PARTY_DARWIN )
|
||||
|
||||
# MCU
|
||||
# STM32F3
|
||||
set(INCLUDE_THIRD_PARTY_MCU_STM32F3
|
||||
@@ -74,6 +79,9 @@ set(COMPILE_FLAGS_LIBC "${COMPILE_FLAGS_JERRY} ${C_FLAGS_JERRY}")
|
||||
# Linux
|
||||
file(GLOB SOURCE_LIBC_LINUX target/linux/*.c target/linux/*.S)
|
||||
|
||||
# Darwin
|
||||
file(GLOB SOURCE_LIBC_DARWIN target/darwin/*.c target/darwin/*.S)
|
||||
|
||||
# MCU
|
||||
# stm32f3
|
||||
file(GLOB SOURCE_LIBC_MCU_STM32F3 target/mcu-stubs/*.c target/mcu-stubs/*.S)
|
||||
|
||||
Reference in New Issue
Block a user