Skip to content

Commit 8b59788

Browse files
committedJun 28, 2018
[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 llvm-svn: 335898
1 parent 197e73f commit 8b59788

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed
 

‎clang/CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,15 @@ if (CLANG_ENABLE_BOOTSTRAP)
621621
LLVM_ENABLE_PROJECTS
622622
LLVM_ENABLE_RUNTIMES)
623623

624-
# We don't need to depend on compiler-rt if we're building instrumented
624+
# We don't need to depend on compiler-rt/libcxx if we're building instrumented
625625
# because the next stage will use the same compiler used to build this stage.
626-
if(TARGET compiler-rt AND NOT LLVM_BUILD_INSTRUMENTED)
627-
add_dependencies(clang-bootstrap-deps compiler-rt)
626+
if(NOT LLVM_BUILD_INSTRUMENTED)
627+
if(TARGET compiler-rt)
628+
add_dependencies(clang-bootstrap-deps compiler-rt)
629+
endif()
630+
if(TARGET cxx-headers)
631+
add_dependencies(clang-bootstrap-deps cxx-headers)
632+
endif()
628633
endif()
629634

630635
set(C_COMPILER "clang")

‎clang/runtime/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
5858
endif()
5959
endforeach()
6060

61+
if(TARGET cxx-headers)
62+
set(COMPILER_RT_LIBCXX_DEPENDENCY "cxx-headers")
63+
endif()
64+
6165
ExternalProject_Add(compiler-rt
62-
DEPENDS llvm-config clang
66+
DEPENDS llvm-config clang ${COMPILER_RT_LIBCXX_DEPENDENCY}
6367
PREFIX ${COMPILER_RT_PREFIX}
6468
SOURCE_DIR ${COMPILER_RT_SRC_ROOT}
6569
STAMP_DIR ${STAMP_DIR}

0 commit comments

Comments
 (0)