summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2018-06-28 18:35:25 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2018-06-28 18:35:25 +0000
commit8be0731d31e0934844e0a99812ae08ef505e1c79 (patch)
treec06966cbc29f0e382583beab3f10b49d7157a18b
parent9be8d20d728668acd8065f0dc24c81e71002e3c4 (diff)
downloadclang-8be0731d31e0934844e0a99812ae08ef505e1c79.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335898 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt11
-rw-r--r--runtime/CMakeLists.txt6
2 files changed, 13 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae8835d751..52b8819394 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index af8ab163c7..9c2f5cd9cf 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -58,8 +58,12 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
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}