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
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
TargetInfo.cpp
DEPENDS
- intrinsics_gen
+ ${codegen_deps}
LINK_LIBS
clangAST