[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
Tue Nov 16 08:30:29 PST 2021


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5beec6fb04e7: [libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build (authored by DavidSpickett).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113663/new/

https://reviews.llvm.org/D113663

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -111,10 +111,11 @@
 
 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113663.387659.patch
Type: text/x-patch
Size: 782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211116/68a6092f/attachment.bin>


More information about the libcxx-commits mailing list