1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 load("//llvm:tblgen.bzl", "gentbl")
8 default_visibility = ["//visibility:public"],
12 # TODO: Actually compute version info
14 name = "config_version_gen",
15 outs = ["include/lld/Common/Version.inc"],
16 cmd = "echo '#define LLD_VERSION_STRING \"14.0.0\"' > $@",
20 name = "vcs_version_gen",
21 outs = ["Common/VCSVersion.inc"],
22 cmd = "echo '#undef LLD_REVISION' >> $@\n" +
23 "echo '#undef LLD_REPOSITORY' >> $@\n",
26 # See https://github.com/bazelbuild/bazel/issues/13803
29 hdrs = ["Common/VCSVersion.inc"],
30 strip_include_prefix = "Common",
35 srcs = [":config_version_gen"] + glob(["Common/*.cpp"]),
36 hdrs = glob(["include/lld/Common/*.h"]),
37 includes = ["include"],
49 name = "elf_options_inc_gen",
50 # See https://github.com/bazelbuild/bazel/issues/13803
51 strip_include_prefix = "ELF",
53 "-gen-opt-parser-defs",
56 tblgen = "//llvm:llvm-tblgen",
57 td_file = "ELF/Options.td",
59 "//llvm:include/llvm/Option/OptParser.td",
72 "ELF/Arch/PPCInsns.def",
76 ":elf_options_inc_gen",
77 "//llvm:AllTargetsAsmParsers",
78 "//llvm:AllTargetsCodeGens",
79 "//llvm:AllTargetsDisassemblers",
81 "//llvm:BinaryFormat",
86 "//llvm:DebugInfoDWARF",
96 "//llvm:TransformUtils",
101 name = "coff_options_inc_gen",
102 # See https://github.com/bazelbuild/bazel/issues/13803
103 strip_include_prefix = "COFF",
105 "-gen-opt-parser-defs",
108 tblgen = "//llvm:llvm-tblgen",
109 td_file = "COFF/Options.td",
111 "//llvm:include/llvm/Option/OptParser.td",
124 ":coff_options_inc_gen",
125 "//llvm:AllTargetsAsmParsers",
126 "//llvm:AllTargetsCodeGens",
127 "//llvm:AllTargetsDisassemblers",
132 "//llvm:DebugInfoPDB",
142 "//llvm:TransformUtils",
143 "//llvm:WindowsManifest",
148 name = "mingw_options_inc_gen",
150 "-gen-opt-parser-defs",
153 tblgen = "//llvm:llvm-tblgen",
154 td_file = "MinGW/Options.td",
156 "//llvm:include/llvm/Option/OptParser.td",
166 includes = ["MinGW"],
169 ":mingw_options_inc_gen",
176 name = "macho_options_inc_gen",
177 # See https://github.com/bazelbuild/bazel/issues/13803
178 strip_include_prefix = "MachO",
180 "-gen-opt-parser-defs",
183 tblgen = "//llvm:llvm-tblgen",
184 td_file = "MachO/Options.td",
186 "//llvm:include/llvm/Option/OptParser.td",
196 includes = ["MachO"],
199 ":macho_options_inc_gen",
200 "//libunwind:unwind_headers_only",
206 name = "wasm_options_inc_gen",
207 # See https://github.com/bazelbuild/bazel/issues/13803
208 strip_include_prefix = "wasm",
210 "-gen-opt-parser-defs",
213 tblgen = "//llvm:llvm-tblgen",
214 td_file = "wasm/Options.td",
216 "//llvm:include/llvm/Option/OptParser.td",
229 ":wasm_options_inc_gen",
230 "//llvm:AllTargetsAsmParsers",
231 "//llvm:AllTargetsCodeGens",
232 "//llvm:BinaryFormat",
248 "manual", # External dependency (libxml through WindowsManifest)
249 "nobuildkite", # TODO(gcmn): Remote executors don't have libxml
262 # These are the required names for lld running under different environs.
264 # Unix/Linux require that the binary be named "ld.lld".
265 # macOS require that the binary be named "ld64.lld".
266 # Windows require that the binary be named "lld-link".
267 # WebAssembly builds require that the binary be named "wasm-ld".
278 "target=$$(basename $<); for n in ld.lld ld64.lld lld-link wasm-ld; do ln -sf $$target $(@D)/$$n; done",
279 output_to_bindir = 1,
281 "manual", # External dependency (libxml through WindowsManifest)
282 "nobuildkite", # TODO(gcmn): Remote executors don't have libxml