[PATCH] D109716: [runtimes] Initialize LLVM_DEFAULT_TARGET_TRIPLE if not set by the caller

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 12:35:05 PDT 2021


mstorsjo created this revision.
mstorsjo added a reviewer: phosek.
Herald added a subscriber: mgorny.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109716

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -97,6 +97,11 @@
 
 find_package(Python3 REQUIRED COMPONENTS Interpreter)
 
+if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
+  include(GetHostTriple)
+  get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
+endif()
+
 # Use libtool instead of ar if you are both on an Apple host, and targeting Apple.
 if(CMAKE_HOST_APPLE AND APPLE)
   include(UseLibtool)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109716.372321.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210913/0b406cd8/attachment.bin>


More information about the llvm-commits mailing list