llvm.org GIT mirror llvm / 0c0eb1c
[gn build] Add build file for clang/lib/Driver Mostly boring, except for the spurious dependency on StaticAnalyzer/Checkers -- see comments in the code. Differential Revision: https://reviews.llvm.org/D55927 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349832 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 9 months ago
4 changed file(s) with 99 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 group("default") {
11 deps = [
2 "//clang/lib/Driver",
23 "//clang/lib/Parse",
34 "//clang/tools/clang-format",
45 "//lld/test",
0 import("//llvm/utils/TableGen/tablegen.gni")
1
2 tablegen("Options") {
3 args = [ "-gen-opt-parser-defs" ]
4 }
0 import("//clang/utils/TableGen/clang_tablegen.gni")
1
2 clang_tablegen("Checkers") {
3 args = [ "-gen-clang-sa-checkers" ]
4 }
0 static_library("Driver") {
1 output_name = "clangDriver"
2 configs += [ "//llvm/utils/gn/build:clang_code" ]
3 include_dirs = [ "." ]
4 deps = [
5 "//clang/include/clang/Config",
6
7 # Driver doesn't depend on StaticAnalyzer and the other way round, but
8 # as of clang r311958 Driver does depend on StaticAnalyzer/Checkers's
9 # tablegen'd Checkers.inc. The CMake build runs all clang tablegen steps
10 # before all lib compilations via the clang-tablegen-targets target; the
11 # GN build has this dependency instead.
12 # FIXME: Move Checkers.td somewhere else to clean up this layering mess.
13 # See the review thread of r311958 for details.
14 "//clang/include/clang/StaticAnalyzer/Checkers",
15 "//clang/lib/Basic",
16 "//llvm/include/llvm/Config:llvm-config",
17 "//llvm/lib/BinaryFormat",
18 "//llvm/lib/Option",
19 "//llvm/lib/Support",
20 ]
21 public_deps = [
22 # public_dep because public header Options.h includes generated Options.inc.
23 "//clang/include/clang/Driver:Options",
24 ]
25 if (host_os == "win") {
26 # MSVCToolChain.cpp uses version.dll.
27 libs = [ "version.lib" ]
28 }
29 sources = [
30 "Action.cpp",
31 "Compilation.cpp",
32 "DarwinSDKInfo.cpp",
33 "Distro.cpp",
34 "Driver.cpp",
35 "DriverOptions.cpp",
36 "Job.cpp",
37 "Multilib.cpp",
38 "Phases.cpp",
39 "SanitizerArgs.cpp",
40 "Tool.cpp",
41 "ToolChain.cpp",
42 "ToolChains/AMDGPU.cpp",
43 "ToolChains/AVR.cpp",
44 "ToolChains/Ananas.cpp",
45 "ToolChains/Arch/AArch64.cpp",
46 "ToolChains/Arch/ARM.cpp",
47 "ToolChains/Arch/Mips.cpp",
48 "ToolChains/Arch/PPC.cpp",
49 "ToolChains/Arch/RISCV.cpp",
50 "ToolChains/Arch/Sparc.cpp",
51 "ToolChains/Arch/SystemZ.cpp",
52 "ToolChains/Arch/X86.cpp",
53 "ToolChains/BareMetal.cpp",
54 "ToolChains/Clang.cpp",
55 "ToolChains/CloudABI.cpp",
56 "ToolChains/CommonArgs.cpp",
57 "ToolChains/Contiki.cpp",
58 "ToolChains/CrossWindows.cpp",
59 "ToolChains/Cuda.cpp",
60 "ToolChains/Darwin.cpp",
61 "ToolChains/DragonFly.cpp",
62 "ToolChains/FreeBSD.cpp",
63 "ToolChains/Fuchsia.cpp",
64 "ToolChains/Gnu.cpp",
65 "ToolChains/HIP.cpp",
66 "ToolChains/Haiku.cpp",
67 "ToolChains/Hexagon.cpp",
68 "ToolChains/Hurd.cpp",
69 "ToolChains/Linux.cpp",
70 "ToolChains/MSVC.cpp",
71 "ToolChains/MinGW.cpp",
72 "ToolChains/Minix.cpp",
73 "ToolChains/MipsLinux.cpp",
74 "ToolChains/Myriad.cpp",
75 "ToolChains/NaCl.cpp",
76 "ToolChains/NetBSD.cpp",
77 "ToolChains/OpenBSD.cpp",
78 "ToolChains/PS4CPU.cpp",
79 "ToolChains/RISCVToolchain.cpp",
80 "ToolChains/Solaris.cpp",
81 "ToolChains/TCE.cpp",
82 "ToolChains/WebAssembly.cpp",
83 "ToolChains/XCore.cpp",
84 "Types.cpp",
85 "XRayArgs.cpp",
86 ]
87 }