[llvm] 491a4a7 - [CMake] Passthrough CMAKE_SYSTEM_NAME to default builtin and runtimes target
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 22:38:56 PST 2020
Author: Petr Hosek
Date: 2020-02-04T22:38:20-08:00
New Revision: 491a4a7ac9e39fd4cc20a21e7da1961dfc7fc275
URL: https://github.com/llvm/llvm-project/commit/491a4a7ac9e39fd4cc20a21e7da1961dfc7fc275
DIFF: https://github.com/llvm/llvm-project/commit/491a4a7ac9e39fd4cc20a21e7da1961dfc7fc275.diff
LOG: [CMake] Passthrough CMAKE_SYSTEM_NAME to default builtin and runtimes target
When building the default builtin and runtimes target, set the
CMAKE_SYSTEM_NAME to the current one. This is not necessary on
Linux and Darwin, but it appears to be necessary on Windows,
otherwise CMake fails.
Differential Revision: https://reviews.llvm.org/D73811
Added:
Modified:
llvm/runtimes/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 40869f0a12d2..6d68b0715fbf 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -245,6 +245,7 @@ else() # if this is included from LLVM's CMake
-DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_C_COMPILER_WORKS=ON
-DCMAKE_ASM_COMPILER_WORKS=ON
+ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
PASSTHROUGH_PREFIXES COMPILER_RT
USE_TOOLCHAIN
${EXTRA_ARGS})
@@ -390,6 +391,7 @@ else() # if this is included from LLVM's CMake
-DCMAKE_C_COMPILER_WORKS=ON
-DCMAKE_CXX_COMPILER_WORKS=ON
-DCMAKE_ASM_COMPILER_WORKS=ON
+ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
${ARG_PREFIXES}
EXTRA_TARGETS ${extra_targets}
More information about the llvm-commits
mailing list