[Mlir-commits] [mlir] 0c0f6cf - [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLE
Petr Hosek
llvmlistbot at llvm.org
Fri Mar 11 15:43:39 PST 2022
Author: Petr Hosek
Date: 2022-03-11T15:43:01-08:00
New Revision: 0c0f6cfb7b9fab0ee69ef67ed95c194698c9d794
URL: https://github.com/llvm/llvm-project/commit/0c0f6cfb7b9fab0ee69ef67ed95c194698c9d794
DIFF: https://github.com/llvm/llvm-project/commit/0c0f6cfb7b9fab0ee69ef67ed95c194698c9d794.diff
LOG: [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLE
This clarifies that this is an LLVM specific variable and avoids
potential conflicts with other projects.
Differential Revision: https://reviews.llvm.org/D119918
Added:
Modified:
bolt/test/Unit/lit.site.cfg.py.in
bolt/test/lit.site.cfg.py.in
clang-tools-extra/clangd/test/lit.site.cfg.py.in
clang-tools-extra/test/Unit/lit.site.cfg.py.in
clang-tools-extra/test/lit.site.cfg.py.in
clang/test/Unit/lit.site.cfg.py.in
clang/test/lit.site.cfg.py.in
clang/utils/perf-training/lit.site.cfg.in
clang/utils/perf-training/order-files.lit.site.cfg.in
compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
compiler-rt/test/fuzzer/lit.site.cfg.py.in
compiler-rt/unittests/lit.common.unit.configured.in
cross-project-tests/lit.site.cfg.py.in
flang/test/NonGtestUnit/lit.site.cfg.py.in
flang/test/Unit/lit.site.cfg.py.in
lld/test/Unit/lit.site.cfg.py.in
lld/test/lit.site.cfg.py.in
lldb/test/API/lit.site.cfg.py.in
lldb/test/CMakeLists.txt
lldb/test/Shell/lit.site.cfg.py.in
lldb/test/Unit/lit.site.cfg.py.in
lldb/test/lit.site.cfg.py.in
llvm/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/CrossCompile.cmake
llvm/cmake/modules/LLVMConfig.cmake.in
llvm/runtimes/CMakeLists.txt
llvm/test/lit.site.cfg.py.in
llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
llvm/utils/gn/secondary/clang/test/BUILD.gn
llvm/utils/gn/secondary/lld/test/BUILD.gn
llvm/utils/gn/secondary/lldb/test/BUILD.gn
llvm/utils/gn/secondary/llvm/test/BUILD.gn
mlir/examples/standalone/test/lit.site.cfg.py.in
mlir/test/lit.site.cfg.py.in
polly/test/Unit/lit.site.cfg.in
polly/test/lit.site.cfg.in
Removed:
################################################################################
diff --git a/bolt/test/Unit/lit.site.cfg.py.in b/bolt/test/Unit/lit.site.cfg.py.in
index 92f9c91104766..45a36c58923fb 100644
--- a/bolt/test/Unit/lit.site.cfg.py.in
+++ b/bolt/test/Unit/lit.site.cfg.py.in
@@ -8,7 +8,7 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.bolt_obj_root = "@BOLT_BINARY_DIR@"
config.bolt_src_root = "@BOLT_SOURCE_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/bolt/test/lit.site.cfg.py.in b/bolt/test/lit.site.cfg.py.in
index e2691e3933d96..8c94a5609a9d0 100644
--- a/bolt/test/lit.site.cfg.py.in
+++ b/bolt/test/lit.site.cfg.py.in
@@ -12,7 +12,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@"
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.enable_shared = @ENABLE_SHARED@
config.enable_backtrace = @ENABLE_BACKTRACES@
diff --git a/clang-tools-extra/clangd/test/lit.site.cfg.py.in b/clang-tools-extra/clangd/test/lit.site.cfg.py.in
index 853a3bf24a072..2b294eaa5ae5a 100644
--- a/clang-tools-extra/clangd/test/lit.site.cfg.py.in
+++ b/clang-tools-extra/clangd/test/lit.site.cfg.py.in
@@ -6,7 +6,7 @@ config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.clang_libs_dir = "@CLANG_LIBS_DIR@"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
diff --git a/clang-tools-extra/test/Unit/lit.site.cfg.py.in b/clang-tools-extra/test/Unit/lit.site.cfg.py.in
index dc7ee330d13a0..6086f00dfc681 100644
--- a/clang-tools-extra/test/Unit/lit.site.cfg.py.in
+++ b/clang-tools-extra/test/Unit/lit.site.cfg.py.in
@@ -4,6 +4,6 @@ config.extra_tools_obj_dir = "@CLANG_TOOLS_BINARY_DIR@/unittests"
config.extra_tools_src_dir = "@CLANG_TOOLS_SOURCE_DIR@/unittests"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.shlibdir = "@SHLIBDIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
lit_config.load_config(config, "@CLANG_TOOLS_SOURCE_DIR@/test/Unit/lit.cfg.py")
diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in
index d30e6664816b7..59357f6cad06b 100644
--- a/clang-tools-extra/test/lit.site.cfg.py.in
+++ b/clang-tools-extra/test/lit.site.cfg.py.in
@@ -10,7 +10,7 @@ config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.clang_libs_dir = "@SHLIBDIR@"
config.python_executable = "@Python3_EXECUTABLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
diff --git a/clang/test/Unit/lit.site.cfg.py.in b/clang/test/Unit/lit.site.cfg.py.in
index 3edab4473dc42..acd3cc8f29e9d 100644
--- a/clang/test/Unit/lit.site.cfg.py.in
+++ b/clang/test/Unit/lit.site.cfg.py.in
@@ -10,7 +10,7 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
config.enable_shared = @ENABLE_SHARED@
config.shlibdir = path(r"@SHLIBDIR@")
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
# Support substitution of the tools_dir, libs_dirs, and build_mode with user
# parameters. This is used when we can't determine the tool dir at
diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in
index 1e2e331d54db9..2272626079112 100644
--- a/clang/test/lit.site.cfg.py.in
+++ b/clang/test/lit.site.cfg.py.in
@@ -16,7 +16,7 @@ config.clang_src_dir = path(r"@CLANG_SOURCE_DIR@")
config.clang_tools_dir = path(r"@CLANG_TOOLS_DIR@")
config.clang_lib_dir = path(r"@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.host_cc = "@CMAKE_C_COMPILER@"
config.host_cxx = "@CMAKE_CXX_COMPILER@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
diff --git a/clang/utils/perf-training/lit.site.cfg.in b/clang/utils/perf-training/lit.site.cfg.in
index a1c6d6bc663da..a41c88901cf3b 100644
--- a/clang/utils/perf-training/lit.site.cfg.in
+++ b/clang/utils/perf-training/lit.site.cfg.in
@@ -6,7 +6,7 @@ config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/clang/utils/perf-training/order-files.lit.site.cfg.in b/clang/utils/perf-training/order-files.lit.site.cfg.in
index 91f2b79d208d5..f8294e7405429 100644
--- a/clang/utils/perf-training/order-files.lit.site.cfg.in
+++ b/clang/utils/perf-training/order-files.lit.site.cfg.in
@@ -6,7 +6,7 @@ config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 0d6dd8f500ced..062955c705332 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -128,7 +128,7 @@ macro(set_output_name output name arch)
if(COMPILER_RT_DEFAULT_TARGET_ONLY)
set(triple "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
else()
- set(triple "${TARGET_TRIPLE}")
+ set(triple "${LLVM_TARGET_TRIPLE}")
endif()
# Except for baremetal, when using arch-suffixed runtime library names,
# clang only looks for libraries named "arm" or "armhf", see
diff --git a/compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake b/compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
index 42ede171e41e5..4b71369642a26 100644
--- a/compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
@@ -23,10 +23,10 @@ macro(compiler_rt_mock_llvm_cmake_config_set_cmake_path)
endmacro()
function(compiler_rt_mock_llvm_cmake_config_set_target_triple)
- # Various bits of compiler-rt depend on the `TARGET_TRIPLE`variable being
- # defined. This function tries to set a sensible value for the variable.
- # This is a function rather than a macro to avoid polluting the variable
- # namespace.
+ # Various bits of compiler-rt depend on the `LLVM_TARGET_TRIPLE` variable
+ # being defined. This function tries to set a sensible value for the
+ # variable. This is a function rather than a macro to avoid polluting the
+ # variable namespace.
set(COMPILER_OUTPUT "")
# If the user provides `COMPILER_RT_DEFAULT_TARGET_ONLY` and `CMAKE_C_COMPILER_TARGET`
@@ -35,7 +35,7 @@ function(compiler_rt_mock_llvm_cmake_config_set_target_triple)
if (COMPILER_RT_DEFAULT_TARGET_ONLY)
if (NOT "${CMAKE_C_COMPILER_TARGET}" STREQUAL "")
message(STATUS
- "Using CMAKE_C_COMPILER_TARGET (${CMAKE_C_COMPILER_TARGET}) as TARGET_TRIPLE")
+ "Using CMAKE_C_COMPILER_TARGET (${CMAKE_C_COMPILER_TARGET}) as LLVM_TARGET_TRIPLE")
endif()
set(COMPILER_OUTPUT "${CMAKE_C_COMPILER_TARGET}")
endif()
@@ -61,12 +61,12 @@ function(compiler_rt_mock_llvm_cmake_config_set_target_triple)
if (HAD_ERROR)
message(FATAL_ERROR "Fetching target triple from compiler failed")
endif()
- set(TARGET_TRIPLE "${COMPILER_OUTPUT}")
- message(STATUS "TARGET_TRIPLE: \"${TARGET_TRIPLE}\"")
- if ("${TARGET_TRIPLE}" STREQUAL "")
+ set(LLVM_TARGET_TRIPLE "${COMPILER_OUTPUT}")
+ message(STATUS "TARGET_TRIPLE: \"${LLVM_TARGET_TRIPLE}\"")
+ if ("${LLVM_TARGET_TRIPLE}" STREQUAL "")
message(FATAL_ERROR "TARGET_TRIPLE cannot be empty")
endif()
- set(TARGET_TRIPLE "${TARGET_TRIPLE}" PARENT_SCOPE)
+ set(LLVM_TARGET_TRIPLE "${LLVM_TARGET_TRIPLE}" PARENT_SCOPE)
endfunction()
macro(compiler_rt_mock_llvm_cmake_config_include_cmake_files)
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 052095801aaed..4c2f6e2778b16 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -426,12 +426,12 @@ macro(construct_compiler_rt_default_triple)
endif()
set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${CMAKE_C_COMPILER_TARGET})
else()
- set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING
+ set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} CACHE STRING
"Default triple for which compiler-rt runtimes will be built.")
endif()
- string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
- list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
+ string(REPLACE "-" ";" LLVM_TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
+ list(GET LLVM_TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
# Map various forms of the architecture names to the canonical forms
# (as they are used by clang, see getArchNameForCompilerRTLib).
@@ -442,7 +442,7 @@ macro(construct_compiler_rt_default_triple)
# Determine if test target triple is specified explicitly, and doesn't match the
# default.
- if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)
+ if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL LLVM_TARGET_TRIPLE)
set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE TRUE)
else()
set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE FALSE)
diff --git a/compiler-rt/test/fuzzer/lit.site.cfg.py.in b/compiler-rt/test/fuzzer/lit.site.cfg.py.in
index b883022e2f5a1..8c403a2719a77 100644
--- a/compiler-rt/test/fuzzer/lit.site.cfg.py.in
+++ b/compiler-rt/test/fuzzer/lit.site.cfg.py.in
@@ -12,7 +12,7 @@ config.arm_thumb = "@COMPILER_RT_ARM_THUMB@"
config.osx_sysroot_flag = "@OSX_SYSROOT_FLAG@"
config.cmake_binary_dir = "@CMAKE_BINARY_DIR@"
config.llvm_library_dir = "@LLVM_LIBRARY_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.target_arch = "@LIBFUZZER_TEST_TARGET_ARCH@"
# Load common config for all compiler-rt lit tests.
diff --git a/compiler-rt/unittests/lit.common.unit.configured.in b/compiler-rt/unittests/lit.common.unit.configured.in
index 6a3e404fa932b..66cb4295baff9 100644
--- a/compiler-rt/unittests/lit.common.unit.configured.in
+++ b/compiler-rt/unittests/lit.common.unit.configured.in
@@ -1,7 +1,7 @@
@LIT_SITE_CFG_IN_HEADER@
# Generic config options for all compiler-rt unit tests.
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
diff --git a/cross-project-tests/lit.site.cfg.py.in b/cross-project-tests/lit.site.cfg.py.in
index ae009ea04b228..c184a600e0f3c 100644
--- a/cross-project-tests/lit.site.cfg.py.in
+++ b/cross-project-tests/lit.site.cfg.py.in
@@ -13,7 +13,7 @@ config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.cross_project_tests_obj_root = "@CROSS_PROJECT_TESTS_BINARY_DIR@"
config.cross_project_tests_src_root = "@CROSS_PROJECT_TESTS_SOURCE_DIR@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.is_msvc = lit.util.pythonize_bool("@MSVC@")
config.llvm_enabled_projects = "@LLVM_ENABLE_PROJECTS@".split(";")
diff --git a/flang/test/NonGtestUnit/lit.site.cfg.py.in b/flang/test/NonGtestUnit/lit.site.cfg.py.in
index 3218fe0b5ce3d..3833e223a431b 100644
--- a/flang/test/NonGtestUnit/lit.site.cfg.py.in
+++ b/flang/test/NonGtestUnit/lit.site.cfg.py.in
@@ -10,7 +10,7 @@ config.flang_obj_root = "@FLANG_BINARY_DIR@"
config.flang_src_root = "@FLANG_SOURCE_DIR@"
config.flang_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
config.flang_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/flang/test/Unit/lit.site.cfg.py.in b/flang/test/Unit/lit.site.cfg.py.in
index f8b35612c2b56..d96f51d934d30 100644
--- a/flang/test/Unit/lit.site.cfg.py.in
+++ b/flang/test/Unit/lit.site.cfg.py.in
@@ -10,7 +10,7 @@ config.flang_obj_root = "@FLANG_BINARY_DIR@"
config.flang_src_root = "@FLANG_SOURCE_DIR@"
config.flang_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
config.flang_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/lld/test/Unit/lit.site.cfg.py.in b/lld/test/Unit/lit.site.cfg.py.in
index 65d9f9d85935f..812a07125bc70 100644
--- a/lld/test/Unit/lit.site.cfg.py.in
+++ b/lld/test/Unit/lit.site.cfg.py.in
@@ -10,7 +10,7 @@ config.lld_obj_root = "@LLD_BINARY_DIR@"
config.lld_src_root = "@LLD_SOURCE_DIR@"
config.lld_libs_dir = "@LLD_LIBS_DIR@"
config.lld_tools_dir = "@LLD_TOOLS_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/lld/test/lit.site.cfg.py.in b/lld/test/lit.site.cfg.py.in
index f9f695b624340..f47717aef53af 100644
--- a/lld/test/lit.site.cfg.py.in
+++ b/lld/test/lit.site.cfg.py.in
@@ -12,7 +12,7 @@ config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
config.lld_libs_dir = "@LLD_LIBS_DIR@"
config.lld_tools_dir = "@LLD_TOOLS_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.have_libxar = @LLVM_HAVE_LIBXAR@
diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in
index 987078a53edbb..d5eb624f4b8dc 100644
--- a/lldb/test/API/lit.site.cfg.py.in
+++ b/lldb/test/API/lit.site.cfg.py.in
@@ -16,7 +16,7 @@ config.host_os = "@HOST_OS@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.shared_libs = @LLVM_ENABLE_SHARED_LIBS@
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
config.python_executable = "@Python3_EXECUTABLE@"
config.lua_executable = "@Lua_EXECUTABLE@"
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index e46ae997d5920..7a55bf47b5d34 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -133,7 +133,7 @@ if(TARGET clang)
endif()
if (LLDB_BUILT_STANDALONE)
- set(LLVM_HOST_TRIPLE ${TARGET_TRIPLE})
+ set(LLVM_HOST_TRIPLE ${LLVM_TARGET_TRIPLE})
endif()
add_lldb_test_dependency(
diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in
index 868f0b6e7b268..b8b08b3d74364 100644
--- a/lldb/test/Shell/lit.site.cfg.py.in
+++ b/lldb/test/Shell/lit.site.cfg.py.in
@@ -13,7 +13,7 @@ config.lldb_tools_dir = "@LLDB_TOOLS_DIR@"
# Since it comes from the command line, it may have backslashes which
# should not need to be escaped.
config.lldb_lit_tools_dir = r"@LLDB_LIT_TOOLS_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
diff --git a/lldb/test/Unit/lit.site.cfg.py.in b/lldb/test/Unit/lit.site.cfg.py.in
index c0a881ce5c635..d6352c01251d2 100644
--- a/lldb/test/Unit/lit.site.cfg.py.in
+++ b/lldb/test/Unit/lit.site.cfg.py.in
@@ -8,7 +8,7 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/lldb/test/lit.site.cfg.py.in b/lldb/test/lit.site.cfg.py.in
index 4bd4b52b91aa4..e79f2fd0106a2 100644
--- a/lldb/test/lit.site.cfg.py.in
+++ b/lldb/test/lit.site.cfg.py.in
@@ -8,7 +8,7 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 75062fe194b9b..9892c6cd2c515 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -742,7 +742,13 @@ endif()
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE_default}" CACHE STRING
"Default target for which LLVM will generate code." )
-set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
+if (TARGET_TRIPLE)
+ message(WARNING "TARGET_TRIPLE is deprecated and will be removed in a future release. "
+ "Please use LLVM_DEFAULT_TARGET_TRIPLE instead.")
+ set(LLVM_TARGET_TRIPLE "${TARGET_TRIPLE}")
+else()
+ set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
+endif()
message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index b4105d656433e..25d8d43577398 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1671,11 +1671,11 @@ function(configure_lit_site_cfg site_in site_out)
string(CONCAT LIT_SITE_CFG_IN_HEADER "${LIT_SITE_CFG_IN_HEADER}"
"import os\n"
"target_env = \"${LLVM_TARGET_TRIPLE_ENV}\"\n"
- "config.target_triple = config.environment[target_env] = os.environ.get(target_env, \"${TARGET_TRIPLE}\")\n"
+ "config.target_triple = config.environment[target_env] = os.environ.get(target_env, \"${LLVM_TARGET_TRIPLE}\")\n"
)
# This is expanded to; config.target_triple = ""+config.target_triple+""
- set(TARGET_TRIPLE "\"+config.target_triple+\"")
+ set(LLVM_TARGET_TRIPLE "\"+config.target_triple+\"")
endif()
if (ARG_PATHS)
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index 2a39b6a40a285..5bc1aa635a863 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -77,7 +77,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
-DLLVM_TARGETS_TO_BUILD="${targets_to_build_arg}"
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}"
- -DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET_TRIPLE}"
+ -DLLVM_DEFAULT_TARGET_TRIPLE="${LLVM_TARGET_TRIPLE}"
-DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
-DLLVM_ENABLE_PROJECTS="${llvm_enable_projects_arg}"
-DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}"
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index e1540ff316f7e..ab7eb09b5f0b6 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -37,7 +37,7 @@ set(LLVM_TARGETS_WITH_JIT @LLVM_TARGETS_WITH_JIT@)
@all_llvm_lib_deps@
-set(TARGET_TRIPLE "@TARGET_TRIPLE@")
+set(LLVM_TARGET_TRIPLE "@LLVM_TARGET_TRIPLE@")
set(LLVM_HOST_TRIPLE "@LLVM_HOST_TRIPLE@")
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index b66d6e064bac0..5dc014aee19c0 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -75,7 +75,7 @@ function(builtin_default_target compiler_rt_path)
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
# AIX should fold 32-bit & 64-bit arch libraries into a single archive.
- if (TARGET_TRIPLE MATCHES "aix")
+ if (LLVM_TARGET_TRIPLE MATCHES "aix")
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
endif()
@@ -84,7 +84,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=${TARGET_TRIPLE}
+ -DLLVM_DEFAULT_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
@@ -95,7 +95,7 @@ function(builtin_default_target compiler_rt_path)
DARWIN
SANITIZER
USE_TOOLCHAIN
- TARGET_TRIPLE ${TARGET_TRIPLE}
+ TARGET_TRIPLE ${LLVM_TARGET_TRIPLE}
${EXTRA_ARGS})
endfunction()
@@ -232,7 +232,7 @@ function(runtime_default_target)
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
# AIX should fold 32-bit & 64-bit arch libraries into a single archive.
- if (TARGET_TRIPLE MATCHES "aix")
+ if (LLVM_TARGET_TRIPLE MATCHES "aix")
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
endif()
@@ -242,7 +242,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=${TARGET_TRIPLE}
+ -DLLVM_DEFAULT_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}
@@ -261,7 +261,7 @@ function(runtime_default_target)
${SUB_CHECK_TARGETS}
${SUB_INSTALL_TARGETS}
USE_TOOLCHAIN
- TARGET_TRIPLE ${TARGET_TRIPLE}
+ TARGET_TRIPLE ${LLVM_TARGET_TRIPLE}
${EXTRA_ARGS})
endfunction()
diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in
index 5836c8e62b0d4..233dd605a04bd 100644
--- a/llvm/test/lit.site.cfg.py.in
+++ b/llvm/test/lit.site.cfg.py.in
@@ -3,7 +3,7 @@
import sys
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
index 02ccf1de13f5d..26b1631428826 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
@@ -35,7 +35,7 @@ write_lit_config("lit_site_cfg") {
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_LIT_TOOLS_DIR=", # Intentionally empty, matches cmake build.
"LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
"Python3_EXECUTABLE=$python_path",
]
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
index fd3e9347bb481..f4fec31bc6cb3 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
@@ -14,7 +14,7 @@ template("write_lit_config") {
rebase_path(get_label_info("//clang-tools-extra", "target_out_dir")),
"CLANG_TOOLS_SOURCE_DIR=" + rebase_path("//clang-tools-extra"),
"LLVM_LIBS_DIR=", # needed only for shared builds
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
]
if (host_os == "win") {
# See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
diff --git a/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn
index 0e464f510b9cc..48e1f17c4fb62 100644
--- a/llvm/utils/gn/secondary/clang/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn
@@ -25,7 +25,7 @@ template("write_lit_config") {
"LLVM_LIBS_DIR=", # needed only for shared builds
"LLVM_SOURCE_DIR=" + rebase_path("//llvm", dir),
"LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin", dir),
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
]
if (host_os == "win") {
# See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
diff --git a/llvm/utils/gn/secondary/lld/test/BUILD.gn b/llvm/utils/gn/secondary/lld/test/BUILD.gn
index ec3ab29d54fca..447e747c31dca 100644
--- a/llvm/utils/gn/secondary/lld/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn
@@ -25,7 +25,7 @@ template("write_lit_cfg") {
"LLVM_SOURCE_DIR=" + rebase_path("//llvm"),
"LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
"Python3_EXECUTABLE=$python_path",
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
]
values += invoker.extra_values
}
diff --git a/llvm/utils/gn/secondary/lldb/test/BUILD.gn b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
index e428ceddcc90a..a1ebf8824aad6 100644
--- a/llvm/utils/gn/secondary/lldb/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
@@ -24,7 +24,7 @@ template("write_lit_cfg") {
"LLVM_SOURCE_DIR=" + rebase_path("//llvm"),
"LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
"Python3_EXECUTABLE=$python_path",
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
]
values += invoker.extra_values
}
diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 544bebd731f12..bcf8dcaa32fc3 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -72,7 +72,7 @@ write_lit_config("lit_site_cfg") {
"LLVM_VERSION_SUFFIX=git",
"Python3_EXECUTABLE=$python_path",
"TARGETS_TO_BUILD=$llvm_targets_to_build_string",
- "TARGET_TRIPLE=$llvm_target_triple",
+ "LLVM_TARGET_TRIPLE=$llvm_target_triple",
"LLVM_LIBCXX_USED=0",
diff --git a/mlir/examples/standalone/test/lit.site.cfg.py.in b/mlir/examples/standalone/test/lit.site.cfg.py.in
index f2c9e76f46ea9..9a911f7ac8ed1 100644
--- a/mlir/examples/standalone/test/lit.site.cfg.py.in
+++ b/mlir/examples/standalone/test/lit.site.cfg.py.in
@@ -3,7 +3,7 @@
import sys
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
index b48d878ce2f2f..e6ad6ba69bfcf 100644
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -3,7 +3,7 @@
import sys
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
diff --git a/polly/test/Unit/lit.site.cfg.in b/polly/test/Unit/lit.site.cfg.in
index 837d6c685ce2e..28bf5e70e68b2 100644
--- a/polly/test/Unit/lit.site.cfg.in
+++ b/polly/test/Unit/lit.site.cfg.in
@@ -11,7 +11,7 @@ config.polly_obj_root = "@POLLY_BINARY_DIR@"
config.polly_lib_dir = "@POLLY_LIB_DIR@"
config.enable_shared = @ENABLE_SHARED@
config.shlibdir = "@SHLIBDIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.enable_gpgpu_codegen = "@GPU_CODEGEN@"
config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
config.has_unittests = @POLLY_GTEST_AVAIL@
diff --git a/polly/test/lit.site.cfg.in b/polly/test/lit.site.cfg.in
index 65da8b412e92b..4a97cf67356fb 100644
--- a/polly/test/lit.site.cfg.in
+++ b/polly/test/lit.site.cfg.in
@@ -6,7 +6,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.polly_obj_root = "@POLLY_BINARY_DIR@"
config.polly_lib_dir = "@POLLY_LIB_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
+config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.enable_gpgpu_codegen = "@GPU_CODEGEN@"
config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
config.targets_to_build = "@TARGETS_TO_BUILD@"
@@ -15,7 +15,7 @@ config.extra_paths = "@POLLY_TEST_EXTRA_PATHS@".split(";")
## Check the current platform with regex
import re
EAT_ERR_ON_X86 = ' '
-if (re.match(r'^x86_64*', '@TARGET_TRIPLE@') == None) :
+if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') == None) :
EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
for arch in config.targets_to_build.split():
More information about the Mlir-commits
mailing list