diff options
author | Petr Hosek <phosek@chromium.org> | 2017-11-14 23:47:20 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-11-14 23:47:20 +0000 |
commit | 6dc7825247a1a0b9a8c8db988dd5438006682f67 (patch) | |
tree | f429dd3d8297d9ad6bd230419cc28eb9dcd45ac0 /runtimes/CMakeLists.txt | |
parent | b56431e4c8c0db2745241637fae515bcbd92524a (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtimes/CMakeLists.txt')
-rw-r--r-- | runtimes/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index d916c4a22a2..23bbf3cac0e 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -216,6 +216,8 @@ else() # if this is included from LLVM's CMake -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 CMake -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 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} |