summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2017-07-23 05:09:44 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2017-07-23 05:09:44 +0000
commitd335cdfa54185fe1f916fc8618e78122d13ea1b4 (patch)
treed12c2492dcfa2974f745f6f8e82ae37c3a4527ed /CMakeLists.txt
parent8377397c81b532c340b714f81e4a11e7d7458bd0 (diff)
downloadclang-d335cdfa54185fe1f916fc8618e78122d13ea1b4.tar.gz
[Modules] Rework r274270. Let Clang targets depend on intrinsics_gen.
This gets rid of almost LLVM targets unconditionally depending on intrinsic_gen. Clang's modules still have weird dependencies and hard to remove intrinsics_gen in better way. Then, it'd be better to give whole clang targets depend on intrinsic_gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2667b1d689..3ada1416b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -413,6 +413,13 @@ add_subdirectory(include)
get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
list(APPEND LLVM_COMMON_DEPENDS ${CLANG_TABLEGEN_TARGETS})
+# 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.
+if(LLVM_ENABLE_MODULES AND NOT CLANG_BUILT_STANDALONE)
+ list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
+endif()
+
add_subdirectory(lib)
add_subdirectory(tools)
add_subdirectory(runtime)