aboutsummaryrefslogtreecommitdiff
path: root/runtimes
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2023-09-14 23:44:13 -0700
committerGitHub <noreply@github.com>2023-09-14 23:44:13 -0700
commit7b03a55ce2cb5f8e3a499aac03ce64c94d78fe83 (patch)
treed8dfebb03101f4d9a6e997d375f02005191192a4 /runtimes
parente9e386870720a380baa1e4ba526c6c496fa6c1bd (diff)
downloadllvm-7b03a55ce2cb5f8e3a499aac03ce64c94d78fe83.zip
llvm-7b03a55ce2cb5f8e3a499aac03ce64c94d78fe83.tar.gz
llvm-7b03a55ce2cb5f8e3a499aac03ce64c94d78fe83.tar.bz2
[CMake] Remove SetTargetTriple (#66464)
This module is only used in two places and its logic can be inlined and simplified.
Diffstat (limited to 'runtimes')
-rw-r--r--runtimes/CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 5995298..58af4c8 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -160,8 +160,15 @@ 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)
+message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
+
+# TODO: We shouldn't be using LLVM_DEFAULT_TARGET_TRIPLE for runtimes since we
+# aren't generating code, LLVM_TARGET_TRIPLE is a better fit.
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
- "Default target for which the runtimes will be built.")
+ "Default target for which the runtimes will be built.")
+message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
+
+set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
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)
@@ -175,9 +182,6 @@ endif()
# This can be used to detect whether we're in the runtimes build.
set(LLVM_RUNTIMES_BUILD ON)
-include(SetTargetTriple)
-set_llvm_target_triple()
-
foreach(entry ${runtimes})
get_filename_component(projName ${entry} NAME)