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 \"15.0.4\"' > $@",
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:WindowsDriver",
144 "//llvm:WindowsManifest",
149 name = "mingw_options_inc_gen",
151 "-gen-opt-parser-defs",
154 tblgen = "//llvm:llvm-tblgen",
155 td_file = "MinGW/Options.td",
157 "//llvm:include/llvm/Option/OptParser.td",
167 includes = ["MinGW"],
170 ":mingw_options_inc_gen",
177 name = "macho_options_inc_gen",
178 # See https://github.com/bazelbuild/bazel/issues/13803
179 strip_include_prefix = "MachO",
181 "-gen-opt-parser-defs",
184 tblgen = "//llvm:llvm-tblgen",
185 td_file = "MachO/Options.td",
187 "//llvm:include/llvm/Option/OptParser.td",
197 includes = ["MachO"],
200 ":macho_options_inc_gen",
201 "//libunwind:unwind_headers_only",
207 name = "wasm_options_inc_gen",
208 # See https://github.com/bazelbuild/bazel/issues/13803
209 strip_include_prefix = "wasm",
211 "-gen-opt-parser-defs",
214 tblgen = "//llvm:llvm-tblgen",
215 td_file = "wasm/Options.td",
217 "//llvm:include/llvm/Option/OptParser.td",
230 ":wasm_options_inc_gen",
231 "//llvm:AllTargetsAsmParsers",
232 "//llvm:AllTargetsCodeGens",
233 "//llvm:BinaryFormat",
249 "manual", # External dependency (libxml through WindowsManifest)
250 "nobuildkite", # TODO(gcmn): Remote executors don't have libxml
263 # These are the required names for lld running under different environs.
265 # Unix/Linux require that the binary be named "ld.lld".
266 # macOS require that the binary be named "ld64.lld".
267 # Windows require that the binary be named "lld-link".
268 # WebAssembly builds require that the binary be named "wasm-ld".
279 "target=$$(basename $<); for n in ld.lld ld64.lld lld-link wasm-ld; do ln -sf $$target $(@D)/$$n; done",
280 output_to_bindir = 1,
282 "manual", # External dependency (libxml through WindowsManifest)
283 "nobuildkite", # TODO(gcmn): Remote executors don't have libxml