Author: ab Date: Thu Jun 28 11:35:25 2018 New Revision: 335898 URL: http://llvm.org/viewvc/llvm-project?rev=335898&view=rev Log: [CMake] Make bootstrap and compiler-rt depend on cxx-headers.
Since r334468, we no longer always copy the libcxx headers by virtue of their presence when cmake runs. This makes some of the later stages (compiler-rt, and the bootstrapped stages) depend on them being copied, via the cxx-headers target. Differential Revision: https://reviews.llvm.org/D48700 Modified: cfe/trunk/CMakeLists.txt cfe/trunk/runtime/CMakeLists.txt Modified: cfe/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=335898&r1=335897&r2=335898&view=diff ============================================================================== --- cfe/trunk/CMakeLists.txt (original) +++ cfe/trunk/CMakeLists.txt Thu Jun 28 11:35:25 2018 @@ -621,10 +621,15 @@ if (CLANG_ENABLE_BOOTSTRAP) LLVM_ENABLE_PROJECTS LLVM_ENABLE_RUNTIMES) - # We don't need to depend on compiler-rt if we're building instrumented + # We don't need to depend on compiler-rt/libcxx if we're building instrumented # because the next stage will use the same compiler used to build this stage. - if(TARGET compiler-rt AND NOT LLVM_BUILD_INSTRUMENTED) - add_dependencies(clang-bootstrap-deps compiler-rt) + if(NOT LLVM_BUILD_INSTRUMENTED) + if(TARGET compiler-rt) + add_dependencies(clang-bootstrap-deps compiler-rt) + endif() + if(TARGET cxx-headers) + add_dependencies(clang-bootstrap-deps cxx-headers) + endif() endif() set(C_COMPILER "clang") Modified: cfe/trunk/runtime/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/runtime/CMakeLists.txt?rev=335898&r1=335897&r2=335898&view=diff ============================================================================== --- cfe/trunk/runtime/CMakeLists.txt (original) +++ cfe/trunk/runtime/CMakeLists.txt Thu Jun 28 11:35:25 2018 @@ -58,8 +58,12 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND E endif() endforeach() + if(TARGET cxx-headers) + set(COMPILER_RT_LIBCXX_DEPENDENCY "cxx-headers") + endif() + ExternalProject_Add(compiler-rt - DEPENDS llvm-config clang + DEPENDS llvm-config clang ${COMPILER_RT_LIBCXX_DEPENDENCY} PREFIX ${COMPILER_RT_PREFIX} SOURCE_DIR ${COMPILER_RT_SRC_ROOT} STAMP_DIR ${STAMP_DIR} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits