| 1 |
set(LLVM_LINK_COMPONENTS |
| 2 |
AggressiveInstCombine |
| 3 |
Analysis |
| 4 |
BitReader |
| 5 |
BitWriter |
| 6 |
CodeGenTypes |
| 7 |
Core |
| 8 |
Coroutines |
| 9 |
Coverage |
| 10 |
Demangle |
| 11 |
Extensions |
| 12 |
FrontendDriver |
| 13 |
FrontendHLSL |
| 14 |
FrontendOpenMP |
| 15 |
FrontendOffloading |
| 16 |
HIPStdPar |
| 17 |
IPO |
| 18 |
IRPrinter |
| 19 |
IRReader |
| 20 |
InstCombine |
| 21 |
Instrumentation |
| 22 |
LTO |
| 23 |
Linker |
| 24 |
MC |
| 25 |
ObjCARCOpts |
| 26 |
Object |
| 27 |
Passes |
| 28 |
Plugins |
| 29 |
ProfileData |
| 30 |
ScalarOpts |
| 31 |
Support |
| 32 |
Target |
| 33 |
TargetParser |
| 34 |
TransformUtils |
| 35 |
) |
| 36 |
|
| 37 |
# Workaround for MSVC ARM64 performance regression: |
| 38 |
# https://developercommunity.visualstudio.com/t/Compiling-a-specific-code-for-ARM64-with/10444970 |
| 39 |
# Since /O1 and /O2 represent a set of optimizations, |
| 40 |
# our goal is to disable the /Og flag while retaining the other optimizations from the /O1|/O2 set |
| 41 |
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES Clang |
| 42 |
AND MSVC_VERSION VERSION_GREATER_EQUAL 1932 |
| 43 |
AND MSVC_VERSION VERSION_LESS 1939 |
| 44 |
AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64") |
| 45 |
|
| 46 |
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) |
| 47 |
string(REGEX MATCHALL "/[Oo][12]" opt_flags "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}") |
| 48 |
if (opt_flags) |
| 49 |
if(opt_flags MATCHES "1$") |
| 50 |
set(opt_flags "/Od;/Os;/Oy;/Ob2;/GF;/Gy") |
| 51 |
elseif (opt_flags MATCHES "2$") |
| 52 |
set(opt_flags "/Od;/Oi;/Ot;/Oy;/Ob2;/GF;/Gy") |
| 53 |
endif() |
| 54 |
set_source_files_properties(CGBuiltin.cpp PROPERTIES COMPILE_OPTIONS "${opt_flags}") |
| 55 |
endif() |
| 56 |
endif() |
| 57 |
|
| 58 |
add_clang_library(clangCodeGen |
| 59 |
ABIInfo.cpp |
| 60 |
ABIInfoImpl.cpp |
| 61 |
BackendUtil.cpp |
| 62 |
CGAtomic.cpp |
| 63 |
CGBlocks.cpp |
| 64 |
CGBuiltin.cpp |
| 65 |
CGCUDANV.cpp |
| 66 |
CGCUDARuntime.cpp |
| 67 |
CGCXX.cpp |
| 68 |
CGCXXABI.cpp |
| 69 |
CGCall.cpp |
| 70 |
CGClass.cpp |
| 71 |
CGCleanup.cpp |
| 72 |
CGCoroutine.cpp |
| 73 |
CGDebugInfo.cpp |
| 74 |
CGDecl.cpp |
| 75 |
CGDeclCXX.cpp |
| 76 |
CGException.cpp |
| 77 |
CGExpr.cpp |
| 78 |
CGExprAgg.cpp |
| 79 |
CGExprCXX.cpp |
| 80 |
CGExprComplex.cpp |
| 81 |
CGExprConstant.cpp |
| 82 |
CGExprScalar.cpp |
| 83 |
CGGPUBuiltin.cpp |
| 84 |
CGHLSLRuntime.cpp |
| 85 |
CGHLSLBuiltins.cpp |
| 86 |
CGLoopInfo.cpp |
| 87 |
CGNonTrivialStruct.cpp |
| 88 |
CGObjC.cpp |
| 89 |
CGObjCGNU.cpp |
| 90 |
CGObjCMac.cpp |
| 91 |
CGObjCRuntime.cpp |
| 92 |
CGOpenCLRuntime.cpp |
| 93 |
CGOpenMPRuntime.cpp |
| 94 |
CGOpenMPRuntimeGPU.cpp |
| 95 |
CGPointerAuth.cpp |
| 96 |
CGRecordLayoutBuilder.cpp |
| 97 |
CGStmt.cpp |
| 98 |
CGStmtOpenMP.cpp |
| 99 |
CGVTT.cpp |
| 100 |
CGVTables.cpp |
| 101 |
CodeGenABITypes.cpp |
| 102 |
CodeGenAction.cpp |
| 103 |
CodeGenFunction.cpp |
| 104 |
CodeGenModule.cpp |
| 105 |
CodeGenPGO.cpp |
| 106 |
CodeGenSYCL.cpp |
| 107 |
CodeGenTBAA.cpp |
| 108 |
CodeGenTypes.cpp |
| 109 |
ConstantInitBuilder.cpp |
| 110 |
CoverageMappingGen.cpp |
| 111 |
ItaniumCXXABI.cpp |
| 112 |
HLSLBufferLayoutBuilder.cpp |
| 113 |
LinkInModulesPass.cpp |
| 114 |
MacroPPCallbacks.cpp |
| 115 |
MicrosoftCXXABI.cpp |
| 116 |
ModuleBuilder.cpp |
| 117 |
ObjectFilePCHContainerWriter.cpp |
| 118 |
PatternInit.cpp |
| 119 |
SanitizerMetadata.cpp |
| 120 |
SwiftCallingConv.cpp |
| 121 |
TargetBuiltins/ARM.cpp |
| 122 |
TargetBuiltins/AMDGPU.cpp |
| 123 |
TargetBuiltins/DirectX.cpp |
| 124 |
TargetBuiltins/Hexagon.cpp |
| 125 |
TargetBuiltins/NVPTX.cpp |
| 126 |
TargetBuiltins/PPC.cpp |
| 127 |
TargetBuiltins/RISCV.cpp |
| 128 |
TargetBuiltins/SPIR.cpp |
| 129 |
TargetBuiltins/SystemZ.cpp |
| 130 |
TargetBuiltins/WebAssembly.cpp |
| 131 |
TargetBuiltins/X86.cpp |
| 132 |
TargetInfo.cpp |
| 133 |
Targets/AArch64.cpp |
| 134 |
Targets/AMDGPU.cpp |
| 135 |
Targets/ARC.cpp |
| 136 |
Targets/ARM.cpp |
| 137 |
Targets/AVR.cpp |
| 138 |
Targets/BPF.cpp |
| 139 |
Targets/CSKY.cpp |
| 140 |
Targets/DirectX.cpp |
| 141 |
Targets/Hexagon.cpp |
| 142 |
Targets/Lanai.cpp |
| 143 |
Targets/LoongArch.cpp |
| 144 |
Targets/M68k.cpp |
| 145 |
Targets/MSP430.cpp |
| 146 |
Targets/Mips.cpp |
| 147 |
Targets/NVPTX.cpp |
| 148 |
Targets/PPC.cpp |
| 149 |
Targets/RISCV.cpp |
| 150 |
Targets/SPIR.cpp |
| 151 |
Targets/Sparc.cpp |
| 152 |
Targets/SystemZ.cpp |
| 153 |
Targets/TCE.cpp |
| 154 |
Targets/VE.cpp |
| 155 |
Targets/WebAssembly.cpp |
| 156 |
Targets/X86.cpp |
| 157 |
Targets/XCore.cpp |
| 158 |
TrapReasonBuilder.cpp |
| 159 |
VarBypassDetector.cpp |
| 160 |
|
| 161 |
DEPENDS |
| 162 |
vt_gen |
| 163 |
intrinsics_gen |
| 164 |
ClangDriverOptions |
| 165 |
# These generated headers are included transitively. |
| 166 |
target_parser_gen |
| 167 |
|
| 168 |
LINK_LIBS |
| 169 |
clangAST |
| 170 |
clangAnalysis |
| 171 |
clangBasic |
| 172 |
clangFrontend |
| 173 |
clangLex |
| 174 |
clangSerialization |
| 175 |
) |