[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / lib / Basic / CMakeLists.txt
blobcaa1b6002e6f18cb4ee84a9f70cc8f56de823700
1 set(LLVM_LINK_COMPONENTS
2   Support
3   TargetParser
4   )
6 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
7 find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
9 # The VC revision include that we want to generate.
10 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
12 set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
14 if(llvm_vc AND LLVM_APPEND_VC_REV)
15   set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
16 endif()
17 if (LLVM_VC_REPOSITORY AND LLVM_VC_REVISION)
18   set(llvm_source_dir ${LLVM_SOURCE_DIR})
19   set(llvm_vc_repository ${LLVM_VC_REPOSITORY})
20   set(llvm_vc_revision ${LLVM_VC_REVISION})
21 endif()
22 if(clang_vc AND LLVM_APPEND_VC_REV)
23   set(clang_source_dir ${CLANG_SOURCE_DIR})
24 endif()
25 if (CLANG_VC_REPOSITORY AND CLANG_VC_REVISION)
26   set(clang_source_dir ${CLANG_SOURCE_DIR})
27   set(clang_vc_repository ${CLANG_VC_REPOSITORY})
28   set(clang_vc_revision ${CLANG_VC_REVISION})
29 endif()
31 # Create custom target to generate the VC revision include.
32 add_custom_command(OUTPUT "${version_inc}"
33   DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}"
34   COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\""
35                            "-DLLVM_SOURCE_DIR=${llvm_source_dir}"
36                            "-DCLANG_SOURCE_DIR=${clang_source_dir}"
37                            "-DCLANG_VC_REPOSITORY=${clang_vc_repository}"
38                            "-DCLANG_VC_REVISION=${clang_vc_revision}"
39                            "-DHEADER_FILE=${version_inc}"
40                            "-DLLVM_VC_REPOSITORY=${llvm_vc_repository}"
41                            "-DLLVM_VC_REVISION=${llvm_vc_revision}"
42                            -P "${generate_vcs_version_script}")
44 # Mark the generated header as being generated.
45 set_source_files_properties("${version_inc}"
46   PROPERTIES GENERATED TRUE
47              HEADER_FILE_ONLY TRUE)
49 if(CLANG_VENDOR)
50   set_source_files_properties(Version.cpp
51     PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
52 endif()
54 add_clang_library(clangBasic
55   Attributes.cpp
56   Builtins.cpp
57   CLWarnings.cpp
58   CharInfo.cpp
59   CodeGenOptions.cpp
60   Cuda.cpp
61   DarwinSDKInfo.cpp
62   Diagnostic.cpp
63   DiagnosticIDs.cpp
64   DiagnosticOptions.cpp
65   ExpressionTraits.cpp
66   FileEntry.cpp
67   FileManager.cpp
68   FileSystemStatCache.cpp
69   IdentifierTable.cpp
70   LangOptions.cpp
71   LangStandards.cpp
72   MakeSupport.cpp
73   Module.cpp
74   ObjCRuntime.cpp
75   OpenCLOptions.cpp
76   OpenMPKinds.cpp
77   OperatorPrecedence.cpp
78   ParsedAttrInfo.cpp
79   ProfileList.cpp
80   NoSanitizeList.cpp
81   SanitizerSpecialCaseList.cpp
82   Sanitizers.cpp
83   Sarif.cpp
84   SourceLocation.cpp
85   SourceManager.cpp
86   Stack.cpp
87   TargetID.cpp
88   TargetInfo.cpp
89   Targets.cpp
90   Targets/AArch64.cpp
91   Targets/AMDGPU.cpp
92   Targets/ARC.cpp
93   Targets/ARM.cpp
94   Targets/AVR.cpp
95   Targets/BPF.cpp
96   Targets/CSKY.cpp
97   Targets/DirectX.cpp
98   Targets/Hexagon.cpp
99   Targets/Lanai.cpp
100   Targets/Le64.cpp
101   Targets/LoongArch.cpp
102   Targets/M68k.cpp
103   Targets/MSP430.cpp
104   Targets/Mips.cpp
105   Targets/NVPTX.cpp
106   Targets/OSTargets.cpp
107   Targets/PNaCl.cpp
108   Targets/PPC.cpp
109   Targets/RISCV.cpp
110   Targets/SPIR.cpp
111   Targets/Sparc.cpp
112   Targets/SystemZ.cpp
113   Targets/TCE.cpp
114   Targets/VE.cpp
115   Targets/WebAssembly.cpp
116   Targets/X86.cpp
117   Targets/XCore.cpp
118   TokenKinds.cpp
119   TypeTraits.cpp
120   Version.cpp
121   Warnings.cpp
122   XRayInstr.cpp
123   XRayLists.cpp
124   ${version_inc}
126   DEPENDS
127   omp_gen
128   )
130 target_link_libraries(clangBasic
131   PRIVATE
132   ${LLVM_ATOMIC_LIB}