aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CMakeLists.txt')
-rw-r--r--lib/CodeGen/CMakeLists.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/CodeGen/CMakeLists.txt b/lib/CodeGen/CMakeLists.txt
index 00a87d87a290..10c2409f6bff 100644
--- a/lib/CodeGen/CMakeLists.txt
+++ b/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
@@ -57,17 +66,19 @@ add_clang_library(clangCodeGen
CodeGenPGO.cpp
CodeGenTBAA.cpp
CodeGenTypes.cpp
+ CoverageMappingGen.cpp
ItaniumCXXABI.cpp
MicrosoftCXXABI.cpp
ModuleBuilder.cpp
- SanitizerBlacklist.cpp
+ SanitizerMetadata.cpp
TargetInfo.cpp
DEPENDS
- intrinsics_gen
+ ${codegen_deps}
LINK_LIBS
clangAST
clangBasic
clangFrontend
+ clangLex
)