Skip to content

Commit 5beec6f

Browse files
committed
[libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build
This allows tests to tell if they're running natively. Those tests are libcxxabi/test/native/arm-linux-eabi. Which were running on Linaro's bots but became unsupported when we switched to the runtimes build. Reviewed By: #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D113663
1 parent 3ddede8 commit 5beec6f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

runtimes/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ include(HandleLLVMOptions)
111111

112112
find_package(Python3 REQUIRED COMPONENTS Interpreter)
113113

114-
if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
115-
include(GetHostTriple)
116-
get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
117-
endif()
114+
# Host triple is used by tests to check if they are running natively.
115+
include(GetHostTriple)
116+
get_host_triple(LLVM_HOST_TRIPLE)
117+
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
118+
"Default target for which LLVM will generate code.")
118119

119120
option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit tests." ON)
120121
option(LLVM_INCLUDE_DOCS "Generate build targets for the runtimes documentation." ON)

0 commit comments

Comments
 (0)