[libcxx-commits] [PATCH] D113663: [libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 11 04:31:15 PST 2021


DavidSpickett created this revision.
Herald added subscribers: kristof.beyls, mgorny.
DavidSpickett requested review of this revision.
Herald added projects: libc++, libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113663

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -111,9 +111,13 @@
 
 find_package(Python3 REQUIRED COMPONENTS Interpreter)
 
+# Host triple is used by tests to check if they are running natively.
+include(GetHostTriple)
 if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
-  include(GetHostTriple)
   get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
+  set(LLVM_HOST_TRIPLE ${LLVM_DEFAULT_TARGET_TRIPLE})
+else()
+  get_host_triple(LLVM_HOST_TRIPLE)
 endif()
 
 option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit tests." ON)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113663.386477.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211111/c28ed690/attachment.bin>


More information about the libcxx-commits mailing list