[llvm] r318224 - [CMake][runtimes] Set compiler as working even for default target
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 15:47:20 PST 2017
Author: phosek
Date: Tue Nov 14 15:47:20 2017
New Revision: 318224
URL: http://llvm.org/viewvc/llvm-project?rev=318224&view=rev
Log:
[CMake][runtimes] Set compiler as working even for default target
Even when building builtins and runtimes for the default target
we shouldn't assume that the just built compiler is already useable.
When the compiler uses compiler-rt and libc++ as the default runtime
and C++ library, it won't be usable until we finish building runtimes.
Differential Revision: https://reviews.llvm.org/D39715
Modified:
llvm/trunk/runtimes/CMakeLists.txt
Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=318224&r1=318223&r2=318224&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Tue Nov 14 15:47:20 2017
@@ -216,6 +216,8 @@ else() # if this is included from LLVM's
-DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR}
-DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
+ -DCMAKE_C_COMPILER_WORKS=ON
+ -DCMAKE_ASM_COMPILER_WORKS=ON
PASSTHROUGH_PREFIXES COMPILER_RT
USE_TOOLCHAIN
${EXTRA_ARGS})
@@ -244,9 +246,9 @@ else() # if this is included from LLVM's
-DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR}
-DCMAKE_C_COMPILER_TARGET=${target}
-DCMAKE_ASM_COMPILER_TARGET=${target}
- -DCMAKE_C_COMPILER_WORKS=On
- -DCMAKE_ASM_COMPILER_WORKS=On
- -DCOMPILER_RT_DEFAULT_TARGET_ONLY=On
+ -DCMAKE_C_COMPILER_WORKS=ON
+ -DCMAKE_ASM_COMPILER_WORKS=ON
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
${${target}_extra_args}
TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib
PASSTHROUGH_PREFIXES COMPILER_RT
@@ -324,6 +326,9 @@ else() # if this is included from LLVM's
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
-DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
-DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
+ -DCMAKE_C_COMPILER_WORKS=ON
+ -DCMAKE_CXX_COMPILER_WORKS=ON
+ -DCMAKE_ASM_COMPILER_WORKS=ON
PASSTHROUGH_PREFIXES ${prefixes}
EXTRA_TARGETS ${extra_targets}
${test_targets}
More information about the llvm-commits
mailing list