# Target options --------------------------------------------------------------
option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS})
-set(LIBCXX_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "Use alternate target triple.")
+set(LIBCXX_TARGET_TRIPLE "" CACHE STRING "Use alternate target triple.")
set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.")
set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC toolchain.")
set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}")
endif()
+if(LIBCXX_TARGET_TRIPLE)
+ set(TARGET_TRIPLE "${LIBCXX_TARGET_TRIPLE}")
+endif()
+
# Configure compiler.
include(config-ix)
endfunction()
cxx_abi_list_identifier(abi_list_identifier
- "${LIBCXX_TARGET_TRIPLE}"
+ "${TARGET_TRIPLE}"
"${LIBCXX_CXX_ABI_LIBNAME}"
"${LIBCXX_ABI_VERSION}"
"${LIBCXX_ABI_UNSTABLE}"
serialize_lit_param(enable_debug_tests False)
endif()
-if (LIBCXX_TARGET_TRIPLE)
- serialize_lit_param(target_triple "\"${LIBCXX_TARGET_TRIPLE}\"")
+if (TARGET_TRIPLE)
+ serialize_lit_param(target_triple "\"${TARGET_TRIPLE}\"")
endif()
if (LLVM_USE_SANITIZER)
set(LIBCXXABI_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
"Define suffix of library directory name (32/64)")
option(LIBCXXABI_INSTALL_LIBRARY "Install the libc++abi library." ON)
-set(LIBCXXABI_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "Target triple for cross compiling.")
+set(LIBCXXABI_TARGET_TRIPLE "" CACHE STRING "Target triple for cross compiling.")
set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBCXXABI_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}")
endif()
+if (LIBCXXABI_TARGET_TRIPLE)
+ set(TARGET_TRIPLE "${LIBCXXABI_TARGET_TRIPLE}")
+endif()
+
# Configure compiler. Must happen after setting the target flags.
include(config-ix)
serialize_lit_param(use_sanitizer "\"${LLVM_USE_SANITIZER}\"")
endif()
-if (LIBCXXABI_TARGET_TRIPLE)
- serialize_lit_param(target_triple "\"${LIBCXXABI_TARGET_TRIPLE}\"")
+if (TARGET_TRIPLE)
+ serialize_lit_param(target_triple "\"${TARGET_TRIPLE}\"")
endif()
if (LIBCXXABI_BUILD_32_BITS)
cmake_dependent_option(LIBUNWIND_INSTALL_SHARED_LIBRARY
"Install the shared libunwind library." ON
"LIBUNWIND_ENABLE_SHARED;LIBUNWIND_INSTALL_LIBRARY" OFF)
-set(LIBUNWIND_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "Target triple for cross compiling.")
+set(LIBUNWIND_TARGET_TRIPLE "" CACHE STRING "Target triple for cross compiling.")
set(LIBUNWIND_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBUNWIND_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
set(LIBUNWIND_TEST_LINKER_FLAGS "" CACHE STRING
set(LIBUNWIND_SYSROOT "${CMAKE_SYSROOT}")
endif()
+if (LIBUNWIND_TARGET_TRIPLE)
+ set(TARGET_TRIPLE "${LIBUNWIND_TARGET_TRIPLE}")
+endif()
+
# Configure compiler.
include(config-ix)
serialize_lit_param(use_sanitizer "\"${LLVM_USE_SANITIZER}\"")
endif()
-if (LIBUNWIND_TARGET_TRIPLE)
- serialize_lit_param(target_triple "\"${LIBUNWIND_TARGET_TRIPLE}\"")
+if (TARGET_TRIPLE)
+ serialize_lit_param(target_triple "\"${TARGET_TRIPLE}\"")
endif()
if (LIBUNWIND_BUILD_32_BITS)