diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-11-05 20:30:55 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-11-05 20:30:55 +0000 |
commit | dd43a5c41f27c86075e2c426bd95d65f7ceedaab (patch) | |
tree | a868092014910afe87b0a6f682c631ebbd03da46 | |
parent | 059e525970360d6fd7eb2e9f82ff4f167d0a0e86 (diff) | |
download | bcm5719-llvm-dd43a5c41f27c86075e2c426bd95d65f7ceedaab.tar.gz bcm5719-llvm-dd43a5c41f27c86075e2c426bd95d65f7ceedaab.zip |
cmake: Conditionalize CodeGen's dependency on intrinsics_gen
Custom targets in cmake cannot be exported, and this dependency is only
needed in the combined build to ensure that Intrinsics.gen is created
before compiling CodeGen. In the standalone, all of LLVM is build first.
llvm-svn: 221391
-rw-r--r-- | clang/lib/CodeGen/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt index 2c38c24d677..10c2409f6bf 100644 --- a/clang/lib/CodeGen/CMakeLists.txt +++ b/clang/lib/CodeGen/CMakeLists.txt @@ -16,6 +16,15 @@ set(LLVM_LINK_COMPONENTS TransformUtils ) +# In a standard Clang+LLVM build, we need to generate intrinsics before +# building codegen. In a standalone build, LLVM is already built and we don't +# need this dependency. Furthermore, LLVM doesn't export it so we can't have +# this dependency. +set(codegen_deps intrinsics_gen) +if (CLANG_BUILT_STANDALONE) + set(codegen_deps) +endif() + add_clang_library(clangCodeGen BackendUtil.cpp CGAtomic.cpp @@ -65,7 +74,7 @@ add_clang_library(clangCodeGen TargetInfo.cpp DEPENDS - intrinsics_gen + ${codegen_deps} LINK_LIBS clangAST |