1import("//llvm/utils/gn/build/write_vcsrevision.gni")
2
3config("write_vcsrevision_config") {
4  # To pick up the generated inc file.
5  include_dirs = [ target_gen_dir ]
6  visibility = [ ":write_vcsrevision" ]
7}
8
9write_vcsrevision("write_vcsversion") {
10  visibility = [ ":Basic" ]
11  header = "$target_gen_dir/VCSVersion.inc"
12  names = [
13    "LLVM",
14    "CLANG",
15  ]
16  public_configs = [ ":write_vcsrevision_config" ]
17}
18
19static_library("Basic") {
20  output_name = "clangBasic"
21  configs += [ "//llvm/utils/gn/build:clang_code" ]
22  public_deps = [
23    # public_dep because public header Version.h includes generated Version.inc.
24    "//clang/include/clang/Basic:AttrList",
25    "//clang/include/clang/Basic:AttrSubMatchRulesList",
26    "//clang/include/clang/Basic:DiagnosticGroups",
27    "//clang/include/clang/Basic:arm_cde_builtins",
28    "//clang/include/clang/Basic:arm_mve_builtins",
29    "//clang/include/clang/Basic:arm_sve_builtins",
30    "//clang/include/clang/Basic:arm_sve_typeflags",
31    "//clang/include/clang/Basic:diags_tablegen",
32    "//clang/include/clang/Basic:version",
33  ]
34  deps = [
35    ":write_vcsversion",
36    "//clang/include/clang/Basic:AttrHasAttributeImpl",
37    "//clang/include/clang/Basic:arm_fp16",
38    "//clang/include/clang/Basic:arm_neon",
39    "//clang/include/clang/Config",
40    "//llvm/include/llvm/Config:llvm-config",
41    "//llvm/lib/IR",
42    "//llvm/lib/MC",
43    "//llvm/lib/Support",
44  ]
45  include_dirs = [ "." ]
46  sources = [
47    "Attributes.cpp",
48    "Builtins.cpp",
49    "CharInfo.cpp",
50    "CodeGenOptions.cpp",
51    "Cuda.cpp",
52    "Diagnostic.cpp",
53    "DiagnosticIDs.cpp",
54    "DiagnosticOptions.cpp",
55    "ExpressionTraits.cpp",
56    "FileEntry.cpp",
57    "FileManager.cpp",
58    "FileSystemStatCache.cpp",
59    "IdentifierTable.cpp",
60    "LangOptions.cpp",
61    "LangStandards.cpp",
62    "Module.cpp",
63    "ObjCRuntime.cpp",
64    "OpenMPKinds.cpp",
65    "OperatorPrecedence.cpp",
66    "SanitizerBlacklist.cpp",
67    "SanitizerSpecialCaseList.cpp",
68    "Sanitizers.cpp",
69    "SourceLocation.cpp",
70    "SourceManager.cpp",
71    "Stack.cpp",
72    "TargetID.cpp",
73    "TargetInfo.cpp",
74    "Targets.cpp",
75    "Targets/AArch64.cpp",
76    "Targets/AMDGPU.cpp",
77    "Targets/ARC.cpp",
78    "Targets/ARM.cpp",
79    "Targets/AVR.cpp",
80    "Targets/BPF.cpp",
81    "Targets/Hexagon.cpp",
82    "Targets/Lanai.cpp",
83    "Targets/Le64.cpp",
84    "Targets/MSP430.cpp",
85    "Targets/Mips.cpp",
86    "Targets/NVPTX.cpp",
87    "Targets/OSTargets.cpp",
88    "Targets/PNaCl.cpp",
89    "Targets/PPC.cpp",
90    "Targets/RISCV.cpp",
91    "Targets/SPIR.cpp",
92    "Targets/Sparc.cpp",
93    "Targets/SystemZ.cpp",
94    "Targets/TCE.cpp",
95    "Targets/VE.cpp",
96    "Targets/WebAssembly.cpp",
97    "Targets/X86.cpp",
98    "Targets/XCore.cpp",
99    "TokenKinds.cpp",
100    "TypeTraits.cpp",
101    "Version.cpp",
102    "Warnings.cpp",
103    "XRayInstr.cpp",
104    "XRayLists.cpp",
105  ]
106}
107