summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2017-07-19 11:27:31 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2017-07-19 11:27:31 +0000
commit18e8f9ef0645b15c777547d8655a17a315b0815d (patch)
treee1d26daee34930d4509a1d0eb47a122f17bd12bb /CMakeLists.txt
parentcb5b6da03e79e84174d524e64d21bac9bfd59a94 (diff)
Recommit r274270, [CMake] Module builds depend on target intrinsics_gen to be built first.
The builder clang-x86_64-linux-selfhost-modules-2 complains. Investigating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70bc63d9939..61ecfdf970d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -843,6 +843,15 @@ add_subdirectory(lib/TableGen)
add_subdirectory(utils/TableGen)
+# Force target to be built as soon as possible. Clang modules builds depend
+# header-wise on it as they ship all headers from the umbrella folders. Building
+# an entire module might include header, which depends on intrinsics_gen. This
+# should be right after LLVMSupport and LLVMTableGen otherwise we introduce a
+# circular dependence.
+if (LLVM_ENABLE_MODULES)
+ list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
+endif(LLVM_ENABLE_MODULES)
+
add_subdirectory(include/llvm)
add_subdirectory(lib)