Skip to content
Snippets Groups Projects
Commit 5e32d18f authored by Reid Kleckner's avatar Reid Kleckner
Browse files

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221391 91177308-0d34-0410-b5e6-96231b3b80d8
parent 86751f33
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment