summaryrefslogtreecommitdiff
path: root/libcxxabi/CMakeLists.txt
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 /libcxxabi/CMakeLists.txt
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 'libcxxabi/CMakeLists.txt')
-rw-r--r--libcxxabi/CMakeLists.txt29
1 files changed, 3 insertions, 26 deletions
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index ebda5a4fb624..a7e8444e5a19 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -125,24 +125,10 @@ option(LIBCXXABI_INSTALL_HEADERS "Install the libc++abi headers." ON)
option(LIBCXXABI_INSTALL_LIBRARY "Install the libc++abi library." ON)
set(LIBCXXABI_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH "Path to install the libc++abi headers at.")
-if(NOT CMAKE_SYSROOT AND LIBCXXABI_SYSROOT)
- message(WARNING "LIBCXXABI_SYSROOT is deprecated, please use CMAKE_SYSROOT instead")
+# TODO: Remove this after branching for LLVM 15
+if(LIBCXXABI_SYSROOT OR LIBCXXABI_TARGET_TRIPLE OR LIBCXXABI_GCC_TOOLCHAIN)
+ message(WARNING "LIBCXXABI_SYSROOT, LIBCXXABI_TARGET_TRIPLE and LIBCXXABI_GCC_TOOLCHAIN are not supported anymore, please use the native CMake equivalents instead")
endif()
-if(NOT CMAKE_CXX_COMPILER_TARGET AND LIBCXXABI_TARGET_TRIPLE)
- message(WARNING "LIBCXXABI_TARGET_TRIPLE is deprecated, please use CMAKE_CXX_COMPILER_TARGET instead")
-endif()
-if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND LIBCXXABI_GCC_TOOLCHAIN)
- message(WARNING "LIBCXXABI_GCC_TOOLCHAIN is deprecated, please use CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
-endif()
-
-if(CMAKE_CXX_COMPILER_TARGET)
- set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}")
-else()
- set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
-endif()
-set(LIBCXXABI_TARGET_TRIPLE "${LIBCXXABI_DEFAULT_TARGET_TRIPLE}" CACHE STRING "Target triple for cross compiling.")
-set(LIBCXXABI_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE PATH "GCC toolchain for cross compiling.")
-set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}" CACHE PATH "Sysroot for cross compiling.")
set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
@@ -286,15 +272,6 @@ include(HandleLibcxxabiFlags)
if(ZOS)
add_target_flags_if_supported("-fzos-le-char-mode=ebcdic")
endif()
-if(LIBCXXABI_TARGET_TRIPLE)
- add_target_flags_if_supported("--target=${LIBCXXABI_TARGET_TRIPLE}")
-endif()
-if(LIBCXXABI_GCC_TOOLCHAIN)
- add_target_flags_if_supported("--gcc-toolchain=${LIBCXXABI_GCC_TOOLCHAIN}")
-endif()
-if(LIBCXXABI_SYSROOT)
- add_target_flags_if_supported("--sysroot=${LIBCXXABI_SYSROOT}")
-endif()
# Configure compiler. Must happen after setting the target flags.
include(config-ix)