summaryrefslogtreecommitdiff
path: root/libcxx/lib
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2021-10-12 15:59:08 -0400
committerLouis Dionne <ldionne.2@gmail.com>2022-03-01 08:39:42 -0500
commit3ee0cec88effc88285732c8bec2a8f0e4e37c0b1 (patch)
treec68506c88557c1e93442f77a9c77d5ed128fc614 /libcxx/lib
parent368faacac7525e538fa6680aea74e19a75e3458d (diff)
downloadllvm-3ee0cec88effc88285732c8bec2a8f0e4e37c0b1.tar.gz
[runtimes] Remove FOO_TARGET_TRIPLE, FOO_SYSROOT and FOO_GCC_TOOLCHAIN
Instead, folks can use the equivalent variables provided by CMake to set those. This removal aims to reduce complexity and potential for confusion when setting the target triple for building the runtimes, and make it correct when `CMAKE_OSX_ARCHITECTURES` is used (right now both `-arch` and `--target=` will end up being passed, which is downright incorrect). Differential Revision: https://reviews.llvm.org/D112155
Diffstat (limited to 'libcxx/lib')
-rw-r--r--libcxx/lib/abi/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/lib/abi/CMakeLists.txt b/libcxx/lib/abi/CMakeLists.txt
index 421600a6e5ea..a2d41e10de13 100644
--- a/libcxx/lib/abi/CMakeLists.txt
+++ b/libcxx/lib/abi/CMakeLists.txt
@@ -50,8 +50,13 @@ function(cxx_abi_list_identifier result triple abi_library abi_version unstable
set(${result} "${tmp}" PARENT_SCOPE)
endfunction()
+if (CMAKE_CXX_COMPILER_TARGET)
+ set(triple "${CMAKE_CXX_COMPILER_TARGET}")
+else()
+ set(triple "${LLVM_DEFAULT_TARGET_TRIPLE}")
+endif()
cxx_abi_list_identifier(abi_list_identifier
- "${LIBCXX_TARGET_TRIPLE}"
+ "${triple}"
"${LIBCXX_CXX_ABI_LIBNAME}"
"${LIBCXX_ABI_VERSION}"
"${LIBCXX_ABI_UNSTABLE}"