r302795 - Fix two-stage build on windows using DistributionExample cmake cache
NAKAMURA Takumi via cfe-commits
cfe-commits at lists.llvm.org
Thu May 11 06:19:24 PDT 2017
Author: chapuni
Date: Thu May 11 08:19:24 2017
New Revision: 302795
URL: http://llvm.org/viewvc/llvm-project?rev=302795&view=rev
Log:
Fix two-stage build on windows using DistributionExample cmake cache
Thanks to Matthew Larionov <matthewtff at gmail.com>
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/cmake/caches/DistributionExample.cmake
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=302795&r1=302794&r2=302795&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu May 11 08:19:24 2017
@@ -579,10 +579,17 @@ if (CLANG_ENABLE_BOOTSTRAP)
add_dependencies(clang-bootstrap-deps compiler-rt)
endif()
+ set(C_COMPILER "clang")
+ set(CXX_COMPILER "clang++")
+ if(WIN32)
+ set(C_COMPILER "clang-cl.exe")
+ set(CXX_COMPILER "clang-cl.exe")
+ endif()
+
set(COMPILER_OPTIONS
- -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++
- -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang
- -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
+ -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${CXX_COMPILER}
+ -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
+ -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER})
if(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED)
add_dependencies(clang-bootstrap-deps llvm-profdata)
Modified: cfe/trunk/cmake/caches/DistributionExample.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/caches/DistributionExample.cmake?rev=302795&r1=302794&r2=302795&view=diff
==============================================================================
--- cfe/trunk/cmake/caches/DistributionExample.cmake (original)
+++ cfe/trunk/cmake/caches/DistributionExample.cmake Thu May 11 08:19:24 2017
@@ -29,6 +29,13 @@ set(CLANG_BOOTSTRAP_TARGETS
# Setup the bootstrap build.
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
-set(CLANG_BOOTSTRAP_CMAKE_ARGS
- -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake
- CACHE STRING "")
+
+if(STAGE2_CACHE_FILE)
+ set(CLANG_BOOTSTRAP_CMAKE_ARGS
+ -C ${STAGE2_CACHE_FILE}
+ CACHE STRING "")
+else()
+ set(CLANG_BOOTSTRAP_CMAKE_ARGS
+ -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake
+ CACHE STRING "")
+endif()
More information about the cfe-commits
mailing list