diff options
author | Martin Storsjö <martin@martin.st> | 2021-09-13 22:27:17 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-09-14 11:04:23 +0300 |
commit | 61f22f70caf80a44d2528e82e5511d5413b8cf70 (patch) | |
tree | ed18b7b48c060fe0ae6b4e1a15f507a6baf5a35d /runtimes | |
parent | 9aeecdfa8e9104392b435444a5f978d2eb71e51a (diff) | |
download | llvm-61f22f70caf80a44d2528e82e5511d5413b8cf70.tar.gz |
[runtimes] Initialize LLVM_DEFAULT_TARGET_TRIPLE if not set by the caller
Differential Revision: https://reviews.llvm.org/D109716
Diffstat (limited to 'runtimes')
-rw-r--r-- | runtimes/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index b88aa46c663d..350c9c1ba6a4 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -104,6 +104,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() + # Use libtool instead of ar if you are both on an Apple host, and targeting Apple. if(CMAKE_HOST_APPLE AND APPLE) include(UseLibtool) |