aboutsummaryrefslogtreecommitdiff
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
commit7ae667d71ef607c221a03742d445fab4e84830cd (patch)
tree959e33fe02cc6b4208a8480ac5e59452646bcfed
parent1959dbda7582b2dd5f7d9e4cb39025e6842e8a29 (diff)
[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. llvm-svn: 308844
-rw-r--r--clang/CMakeLists.txt7
-rw-r--r--llvm/CMakeLists.txt9
2 files changed, 7 insertions, 9 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 2667b1d6892e..3ada1416b4ee 100644
--- a/clang/CMakeLists.txt
+++ b/clang/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)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 115f39993dbd..c38c59843eae 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -845,15 +845,6 @@ 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)