1set(LLVM_LINK_COMPONENTS
2  Analysis
3  BitReader
4  BitWriter
5  Core
6  Coroutines
7  Coverage
8  IPO
9  IRReader
10  AggressiveInstCombine
11  InstCombine
12  Instrumentation
13  LTO
14  Linker
15  MC
16  ObjCARCOpts
17  Object
18  Passes
19  ProfileData
20  ScalarOpts
21  Support
22  Target
23  TransformUtils
24  )
25
26# In a standard Clang+LLVM build, we need to generate intrinsics before
27# building codegen. In a standalone build, LLVM is already built and we don't
28# need this dependency. Furthermore, LLVM doesn't export it so we can't have
29# this dependency.
30set(codegen_deps intrinsics_gen)
31if (CLANG_BUILT_STANDALONE)
32  set(codegen_deps)
33endif()
34
35add_clang_library(clangCodeGen
36  BackendUtil.cpp
37  CGAtomic.cpp
38  CGBlocks.cpp
39  CGBuiltin.cpp
40  CGCUDANV.cpp
41  CGCUDARuntime.cpp
42  CGCXX.cpp
43  CGCXXABI.cpp
44  CGCall.cpp
45  CGClass.cpp
46  CGCleanup.cpp
47  CGCoroutine.cpp
48  CGDebugInfo.cpp
49  CGDecl.cpp
50  CGDeclCXX.cpp
51  CGException.cpp
52  CGExpr.cpp
53  CGExprAgg.cpp
54  CGExprCXX.cpp
55  CGExprComplex.cpp
56  CGExprConstant.cpp
57  CGExprScalar.cpp
58  CGGPUBuiltin.cpp
59  CGLoopInfo.cpp
60  CGNonTrivialStruct.cpp
61  CGObjC.cpp
62  CGObjCGNU.cpp
63  CGObjCMac.cpp
64  CGObjCRuntime.cpp
65  CGOpenCLRuntime.cpp
66  CGOpenMPRuntime.cpp
67  CGOpenMPRuntimeNVPTX.cpp
68  CGRecordLayoutBuilder.cpp
69  CGStmt.cpp
70  CGStmtOpenMP.cpp
71  CGVTT.cpp
72  CGVTables.cpp
73  CodeGenABITypes.cpp
74  CodeGenAction.cpp
75  CodeGenFunction.cpp
76  CodeGenModule.cpp
77  CodeGenPGO.cpp
78  CodeGenTBAA.cpp
79  CodeGenTypes.cpp
80  ConstantInitBuilder.cpp
81  CoverageMappingGen.cpp
82  ItaniumCXXABI.cpp
83  MacroPPCallbacks.cpp
84  MicrosoftCXXABI.cpp
85  ModuleBuilder.cpp
86  ObjectFilePCHContainerOperations.cpp
87  SanitizerMetadata.cpp
88  SwiftCallingConv.cpp
89  TargetInfo.cpp
90  VarBypassDetector.cpp
91
92  DEPENDS
93  ${codegen_deps}
94
95  LINK_LIBS
96  clangAnalysis
97  clangAST
98  clangBasic
99  clangFrontend
100  clangLex
101  )
102