File: BUILD.gn

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (243 lines) | stat: -rw-r--r-- 5,760 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
import("//llvm/lib/Target/targets.gni")
import("//llvm/utils/gn/build/write_cmake_config.gni")

# In the CMake build, each plugin calls `add_lldb_library(name PLUGIN ...)`,
# which implicitly adds the plugin name to the LLDB_PLUGINS list.
# A few places then query that list and add dependencies on it.
# lldb/source/Plugins/CMakeList.txt then does string munging on the list of
# plugin names to generate Plugins.def.
# In the GN build, we instead have an explicit list of all plugins here.
# Every entry in this list is a (GN target, LLDB_PLUGIN Plugins.def name) pair.
lldb_plugins = []
if (llvm_build_X86) {
  lldb_plugins += [ [
        "//lldb/source/Plugins/ABI/X86",
        "ABIX86",
      ] ]
}
lldb_plugins += [
  [
    "//lldb/source/Plugins/Architecture/PPC64",
    "ArchitecturePPC64",
  ],
  [
    "//lldb/source/Plugins/Disassembler/LLVMC",
    "DisassemblerLLVMC",
  ],
  [
    "//lldb/source/Plugins/DynamicLoader/Darwin-Kernel",
    "DynamicLoaderDarwinKernel",
  ],
  [
    "//lldb/source/Plugins/DynamicLoader/MacOSX-DYLD",
    "DynamicLoaderMacOSXDYLD",
  ],
  [
    "//lldb/source/Plugins/DynamicLoader/POSIX-DYLD",
    "DynamicLoaderPosixDYLD",
  ],
  [
    "//lldb/source/Plugins/DynamicLoader/Static",
    "DynamicLoaderStatic",
  ],
  [
    "//lldb/source/Plugins/DynamicLoader/Windows-DYLD",
    "DynamicLoaderWindowsDYLD",
  ],
  [
    "//lldb/source/Plugins/Instruction/ARM",
    "InstructionARM",
  ],
  [
    "//lldb/source/Plugins/JITLoader/GDB",
    "JITLoaderGDB",
  ],
  [
    "//lldb/source/Plugins/Language/CPlusPlus",
    "CPlusPlusLanguage",
  ],
  [
    "//lldb/source/Plugins/Language/ObjC",
    "ObjCLanguage",
  ],
  [
    "//lldb/source/Plugins/Language/ObjCPlusPlus",
    "ObjCPlusPlusLanguage",
  ],
  [
    "//lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI",
    "CXXItaniumABI",
  ],
  [
    "//lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime",
    "AppleObjCRuntime",
  ],
  [
    "//lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime",
    "RenderScriptRuntime",
  ],
  [
    "//lldb/source/Plugins/ObjectContainer/BSD-Archive",
    "ObjectContainerBSDArchive",
  ],
  [
    "//lldb/source/Plugins/ObjectContainer/Universal-Mach-O",
    "ObjectContainerMachOArchive",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/Breakpad",
    "ObjectFileBreakpad",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/ELF",
    "ObjectFileELF",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/JIT",
    "ObjectFileJIT",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/Mach-O",
    "ObjectFileMachO",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/PDB",
    "ObjectFilePDB",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/PECOFF",
    "ObjectFilePECOFF",
  ],
  [
    "//lldb/source/Plugins/ObjectFile/wasm",
    "ObjectFileWasm",
  ],
  [
    "//lldb/source/Plugins/Platform/Linux",
    "PlatformLinux",
  ],
  [
    "//lldb/source/Plugins/Platform/MacOSX",
    "PlatformMacOSX",
  ],
  [
    "//lldb/source/Plugins/Platform/Windows",
    "PlatformWindows",
  ],
  [
    "//lldb/source/Plugins/Process/elf-core",
    "ProcessElfCore",
  ],
  [
    "//lldb/source/Plugins/Process/gdb-remote",
    "",  # Uses LLDB_PROCESS_GDB_PLUGIN instead.
  ],
  [
    "//lldb/source/Plugins/Process/mach-core",
    "ProcessMachCore",
  ],
  [
    "//lldb/source/Plugins/Process/minidump",
    "ProcessMinidump",
  ],
  [
    "//lldb/source/Plugins/REPL/Clang",
    "ClangREPL",
  ],
  [
    "//lldb/source/Plugins/ScriptInterpreter/None",
    "",  # Uses LLDB_SCRIPT_PLUGIN instead.
  ],
  [
    "//lldb/source/Plugins/SymbolFile/Breakpad",
    "SymbolFileBreakpad",
  ],
  [
    "//lldb/source/Plugins/SymbolFile/DWARF",
    "SymbolFileDWARF",
  ],
  [
    "//lldb/source/Plugins/SymbolFile/PDB",
    "SymbolFilePDB",
  ],
  [
    "//lldb/source/Plugins/SymbolFile/Symtab",
    "SymbolFileSymtab",
  ],
]
if (current_os == "mac") {
  lldb_plugins += [ [
        "//lldb/source/Plugins/SymbolVendor/MacOSX",
        "SymbolVendorMacOSX",
      ] ]
}
lldb_plugins += [
  [
    "//lldb/source/Plugins/SymbolVendor/ELF",
    "SymbolVendorELF",
  ],

  [
    "//lldb/source/Plugins/SymbolVendor/wasm",
    "SymbolVendorWasm",
  ],

  [
    "//lldb/source/Plugins/TypeSystem/Clang",
    "TypeSystemClang",
  ],

  [
    "//lldb/source/Plugins/UnwindAssembly/InstEmulation",
    "UnwindAssemblyInstEmulation",
  ],
  [
    "//lldb/source/Plugins/UnwindAssembly/x86",
    "UnwindAssemblyX86",
  ],
]

write_cmake_config("Plugins.def") {
  input = "Plugins.def.in"
  output = "$target_gen_dir/Plugins.def"

  enum_plugins = ""
  foreach(plugin, lldb_plugins) {
    plugin_id = plugin[1]
    if (plugin_id != "") {
      # \n is a literal '\' followed by a literal 'n', not a newline character.
      # write_cmake_config.py replaces it with a real newline.
      enum_plugins += "LLDB_PLUGIN(" + plugin_id + ")\n"
    }
  }

  deps = [ "//lldb/source/Plugins/ScriptInterpreter/None" ]
  enum_plugins += "LLDB_SCRIPT_PLUGIN(ScriptInterpreterNone)"

  values = [ "LLDB_ENUM_PLUGINS=" + enum_plugins ]

  # These are in separate variables to make sure ProcessWindowsCommon is
  # initalized after all plugins, but before ProcessGDBRemote.
  if (current_os == "win") {
    values +=
        [ "LLDB_PROCESS_WINDOWS_PLUGIN=LLDB_PLUGIN(ProcessWindowsCommon)" ]
  } else {
    values += [ "LLDB_PROCESS_WINDOWS_PLUGIN=" ]
  }
  values += [ "LLDB_PROCESS_GDB_PLUGIN=LLDB_PLUGIN(ProcessGDBRemote)" ]
}

config("AllLldbPlugins_config") {
  visibility = [ ":LldbAllPlugins" ]

  # To pick up Plugins.def.
  include_dirs = [ "$root_gen_dir/lldb/source" ]
}

group("LldbAllPlugins") {
  deps = [ ":Plugins.def" ]
  foreach(plugin, lldb_plugins) {
    deps += [ plugin[0] ]
  }
  public_configs = [ ":AllLldbPlugins_config" ]
}