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