Skip to content

Commit

Permalink
[libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DavidSpickett committed Nov 16, 2021
1 parent 3ddede8 commit 5beec6f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions runtimes/CMakeLists.txt
Expand Up @@ -111,10 +111,11 @@ include(HandleLLVMOptions)

find_package(Python3 REQUIRED COMPONENTS Interpreter)

if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
include(GetHostTriple)
get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
endif()
# 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 LLVM will generate code.")

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)
Expand Down

0 comments on commit 5beec6f

Please sign in to comment.