set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
endif()
-foreach(target aarch64-linux-gnu;armv7-linux-gnueabihf;i386-linux-gnu;x86_64-linux-gnu)
+foreach(target aarch64-linux-gnu;arm-linux-gnueabihf;i386-linux-gnu;x86_64-linux-gnu)
+ set(LINUX_aarch64-linux-gnu_TARGET aarch64-linux-gnu)
+ set(LINUX_arm-linux-gnueabihf_TARGET armv7-linux-gnueabihf)
+ set(LINUX_i386-linux-gnu_TARGET i386-linux-gnu)
+ set(LINUX_x86_64-linux-gnu_TARGET x86_64-linux-gnu)
if(LINUX_${target}_SYSROOT)
# Set the per-target builtins options.
list(APPEND BUILTIN_TARGETS "${target}")
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
- set(BUILTINS_${target}_CMAKE_C_FLAGS "--target=${target}" CACHE STRING "")
- set(BUILTINS_${target}_CMAKE_CXX_FLAGS "--target=${target}" CACHE STRING "")
- set(BUILTINS_${target}_CMAKE_ASM_FLAGS "--target=${target}" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_C_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_CXX_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_ASM_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
list(APPEND RUNTIME_TARGETS "${target}")
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
- set(RUNTIMES_${target}_CMAKE_C_FLAGS "--target=${target}" CACHE STRING "")
- set(RUNTIMES_${target}_CMAKE_CXX_FLAGS "--target=${target}" CACHE STRING "")
- set(RUNTIMES_${target}_CMAKE_ASM_FLAGS "--target=${target}" CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_C_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_CXX_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_ASM_FLAGS "--target=${LINUX_${target}_TARGET}" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")