diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index f6190ee60e3c..77b1a9314b2f 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -693,8 +693,8 @@ else() set(CAN_SYMBOLIZE 1) endif() -find_program(GNU_LD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.bfd ld.bfd DOC "GNU ld") -find_program(GOLD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.gold ld.gold DOC "GNU gold") +find_program(GNU_LD_EXECUTABLE NAMES ${LLVM_TARGET_TRIPLE}-ld.bfd ld.bfd DOC "GNU ld") +find_program(GOLD_EXECUTABLE NAMES ${LLVM_TARGET_TRIPLE}-ld.gold ld.gold DOC "GNU gold") if(COMPILER_RT_SUPPORTED_ARCH) list(REMOVE_DUPLICATES COMPILER_RT_SUPPORTED_ARCH) diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt index b7eb0a133a17..1080fdf00931 100644 --- a/libc/lib/CMakeLists.txt +++ b/libc/lib/CMakeLists.txt @@ -10,7 +10,7 @@ set_target_properties( ) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR) - set(LIBC_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBC_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_TARGET_TRIPLE}) else() set(LIBC_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}) endif() diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 454caedcdf3f..437c4b2f87a0 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -413,12 +413,12 @@ set(LIBCXX_SHARED_OUTPUT_NAME "c++" CACHE STRING "Output name for the shared lib set(LIBCXX_STATIC_OUTPUT_NAME "c++" CACHE STRING "Output name for the static libc++ runtime library.") if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_TARGET_TRIPLE}) set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") - set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1") - set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_TARGET_TRIPLE}/c++/v1") + set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_TARGET_TRIPLE} CACHE PATH "Path where built libc++ libraries should be installed.") - set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH + set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_TARGET_TRIPLE}/c++/v1" CACHE PATH "Path where target-specific libc++ headers should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR}) diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst index 59c695efe44e..5d51088f71ad 100644 --- a/libcxx/docs/BuildingLibcxx.rst +++ b/libcxx/docs/BuildingLibcxx.rst @@ -281,7 +281,7 @@ libc++ specific options .. option:: LIBCXX_INSTALL_INCLUDE_TARGET_DIR:PATH **Default**: ``include/c++/v1`` or - ``include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1`` + ``include/${LLVM_TARGET_TRIPLE}/c++/v1`` Path where target-specific libc++ headers should be installed. If a relative path, relative to ``CMAKE_INSTALL_PREFIX``. diff --git a/libcxx/lib/abi/CMakeLists.txt b/libcxx/lib/abi/CMakeLists.txt index 7c08bd06c50b..a40794c54c3e 100644 --- a/libcxx/lib/abi/CMakeLists.txt +++ b/libcxx/lib/abi/CMakeLists.txt @@ -43,7 +43,7 @@ endfunction() if (CMAKE_CXX_COMPILER_TARGET) set(triple "${CMAKE_CXX_COMPILER_TARGET}") else() - set(triple "${LLVM_DEFAULT_TARGET_TRIPLE}") + set(triple "${LLVM_TARGET_TRIPLE}") endif() cxx_abi_list_identifier(abi_list_identifier "${triple}" diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index dd96a57b6181..281dc6f295a5 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_param(target_triple "\"${CMAKE_CXX_COMPILER_TARGET}\"") else() - serialize_lit_param(target_triple "\"${LLVM_DEFAULT_TARGET_TRIPLE}\"") + serialize_lit_param(target_triple "\"${LLVM_TARGET_TRIPLE}\"") endif() if (LLVM_USE_SANITIZER) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index 8f48d402bc22..2d1fd802077e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -189,8 +189,8 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) - set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) - set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_TARGET_TRIPLE}) + set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_TARGET_TRIPLE} CACHE PATH "Path where built libc++abi libraries should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt index 5da584a2c9cf..3d16fcbec3ca 100644 --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -50,7 +50,7 @@ endif() if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_param(target_triple "\"${CMAKE_CXX_COMPILER_TARGET}\"") else() - serialize_lit_param(target_triple "\"${LLVM_DEFAULT_TARGET_TRIPLE}\"") + serialize_lit_param(target_triple "\"${LLVM_TARGET_TRIPLE}\"") endif() foreach(param IN LISTS LIBCXXABI_TEST_PARAMS) diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 5c547883f992..a626af614fcb 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -115,8 +115,8 @@ set(LIBUNWIND_SHARED_OUTPUT_NAME "unwind" CACHE STRING "Output name for the shar set(LIBUNWIND_STATIC_OUTPUT_NAME "unwind" CACHE STRING "Output name for the static libunwind runtime library.") if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_TARGET_TRIPLE}) + set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_TARGET_TRIPLE} CACHE PATH "Path where built libunwind libraries should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt index 0a09553e692d..aa5f92f04bb3 100644 --- a/libunwind/test/CMakeLists.txt +++ b/libunwind/test/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_param(target_triple "\"${CMAKE_CXX_COMPILER_TARGET}\"") else() - serialize_lit_param(target_triple "\"${LLVM_DEFAULT_TARGET_TRIPLE}\"") + serialize_lit_param(target_triple "\"${LLVM_TARGET_TRIPLE}\"") endif() foreach(param IN LISTS LIBUNWIND_TEST_PARAMS) diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake index bf61d6dbc497..99e659c20ae6 100644 --- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake +++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake @@ -78,7 +78,7 @@ function(llvm_ExternalProject_Add name source_dir) endif() if(NOT ARG_TARGET_TRIPLE) - set(target_triple ${LLVM_DEFAULT_TARGET_TRIPLE}) + set(target_triple ${LLVM_TARGET_TRIPLE}) else() set(target_triple ${ARG_TARGET_TRIPLE}) endif() diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 2c02a7ca843b..fd92fd6f3604 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -74,7 +74,7 @@ function(builtin_default_target compiler_rt_path) DEPENDS ${ARG_DEPENDS} CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR} -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} - -DLLVM_DEFAULT_TARGET_TRIPLE=${LLVM_TARGET_TRIPLE} + -DLLVM_TARGET_TRIPLE=${LLVM_TARGET_TRIPLE} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON @@ -108,7 +108,7 @@ function(builtin_register_target compiler_rt_path target) DEPENDS ${ARG_DEPENDS} CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR} -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} - -DLLVM_DEFAULT_TARGET_TRIPLE=${target} + -DLLVM_TARGET_TRIPLE=${target} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON @@ -228,7 +228,7 @@ function(runtime_default_target) # Builtins were built separately above CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} - -DLLVM_DEFAULT_TARGET_TRIPLE=${LLVM_TARGET_TRIPLE} + -DLLVM_TARGET_TRIPLE=${LLVM_TARGET_TRIPLE} -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} -DLLVM_BUILD_TOOLS=${LLVM_BUILD_TOOLS} @@ -337,7 +337,7 @@ function(runtime_register_target name target) # Builtins were built separately above CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} - -DLLVM_DEFAULT_TARGET_TRIPLE=${target} + -DLLVM_TARGET_TRIPLE=${target} -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON -DCMAKE_C_COMPILER_WORKS=ON diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 3f3ef4e648c0..688d912eccfc 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -154,8 +154,8 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter) # Host triple is used by tests to check if they are running natively. include(GetHostTriple) get_host_triple(LLVM_HOST_TRIPLE) -set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING - "Default target for which the runtimes will be built.") +set(LLVM_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING + "Target for which the runtimes will be built.") option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit tests." ON) option(LLVM_INCLUDE_DOCS "Generate build targets for the runtimes documentation." ON)