6677 lines · plain
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-exception4 5load("@bazel_skylib//rules:common_settings.bzl", "string_flag")6load("@bazel_skylib//rules:expand_template.bzl", "expand_template")7load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")8load("@rules_python//python:defs.bzl", "py_binary")9load("@rules_shell//shell:sh_binary.bzl", "sh_binary")10load("//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")11load(":binary_alias.bzl", "binary_alias")12load(":config.bzl", "llvm_config_defines")13load(":driver.bzl", "generate_driver_selects", "generate_driver_tools_def", "llvm_driver_cc_binary", "select_driver_tools")14load(":enum_targets_gen.bzl", "enum_targets_gen")15load(":targets.bzl", "llvm_targets")16 17package(18 default_visibility = ["//visibility:public"],19 features = ["layering_check"],20)21 22licenses(["notice"])23 24exports_files([25 "LICENSE.TXT",26 "cmake/modules/llvm-driver-template.cpp.in",27 "include/llvm/BinaryFormat/Dwarf.def",28 "include/llvm/CodeGen/SDNodeProperties.td",29 "include/llvm/CodeGen/ValueTypes.td",30 "include/llvm/Frontend/Directive/DirectiveBase.td",31 "include/llvm/Frontend/OpenACC/ACC.td",32 "include/llvm/Frontend/OpenMP/OMP.td",33 "include/llvm/IR/Intrinsics.td",34 "include/llvm/Option/OptParser.td",35 "utils/lit/lit.py",36 # This one is needed for building and vendoring out lldb from off tree.37 "utils/lldbDataFormatters.py",38])39 40# It may be tempting to add compiler flags here, but that should be avoided.41# The necessary warnings and other compile flags should be provided by the42# toolchain or the `.bazelrc` file. This is just a workaround until we have a43# widely available feature to enable unlimited stack frame instead of using44# this `Make` variable.45llvm_copts = [46 "$(STACK_FRAME_UNLIMITED)",47]48 49enum_targets_gen(50 name = "targets_def_gen",51 src = "include/llvm/Config/Targets.def.in",52 out = "include/llvm/Config/Targets.def",53 macro_name = "TARGET",54 targets = llvm_targets,55)56 57# Enabled targets with ASM printers.58llvm_target_asm_printers = [59 t60 for t in llvm_targets61 if glob(["lib/Target/{}/*AsmPrinter.cpp".format(t)])62]63 64enum_targets_gen(65 name = "asm_printers_def_gen",66 src = "include/llvm/Config/AsmPrinters.def.in",67 out = "include/llvm/Config/AsmPrinters.def",68 macro_name = "ASM_PRINTER",69 targets = llvm_target_asm_printers,70)71 72# Enabled targets with ASM parsers.73llvm_target_asm_parsers = [74 t75 for t in llvm_targets76 if glob(77 ["lib/Target/{}/AsmParser/CMakeLists.txt".format(t)],78 allow_empty = True,79 )80]81 82enum_targets_gen(83 name = "asm_parsers_def_gen",84 src = "include/llvm/Config/AsmParsers.def.in",85 out = "include/llvm/Config/AsmParsers.def",86 macro_name = "ASM_PARSER",87 targets = llvm_target_asm_parsers,88)89 90# Enabled targets with disassemblers.91llvm_target_disassemblers = [92 t93 for t in llvm_targets94 if glob(95 ["lib/Target/{}/Disassembler/CMakeLists.txt".format(t)],96 allow_empty = True,97 )98]99 100enum_targets_gen(101 name = "disassemblers_def_gen",102 src = "include/llvm/Config/Disassemblers.def.in",103 out = "include/llvm/Config/Disassemblers.def",104 macro_name = "DISASSEMBLER",105 targets = llvm_target_disassemblers,106)107 108# Enabled targets with MCA.109llvm_target_mcas = [110 t111 for t in llvm_targets112 if glob(113 ["lib/Target/{}/MCA/CMakeLists.txt".format(t)],114 allow_empty = True,115 )116]117 118enum_targets_gen(119 name = "target_mca_def_gen",120 src = "include/llvm/Config/TargetMCAs.def.in",121 out = "include/llvm/Config/TargetMCAs.def",122 macro_name = "TARGETMCA",123 targets = llvm_target_mcas,124)125 126# Enabled targets with exegesis.127llvm_target_exegesis = [128 t129 for t in llvm_targets130 if glob(131 ["tools/llvm-exegesis/lib/{}/CMakeLists.txt".format(t)],132 allow_empty = True,133 )134]135 136enum_targets_gen(137 name = "target_exegesis_def_gen",138 src = "include/llvm/Config/TargetExegesis.def.in",139 out = "include/llvm/Config/TargetExegesis.def",140 macro_name = "EXEGESIS",141 placeholder_name = "@LLVM_ENUM_EXEGESIS@",142 targets = llvm_target_exegesis,143)144 145expand_template(146 name = "abi_breaking_h_gen",147 out = "include/llvm/Config/abi-breaking.h",148 substitutions = {149 # Define to enable checks that alter the LLVM C++ ABI150 "#cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS": "#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0",151 152 # Define to enable reverse iteration of unordered llvm containers153 "#cmakedefine01 LLVM_ENABLE_REVERSE_ITERATION": "#define LLVM_ENABLE_REVERSE_ITERATION 0",154 },155 template = "include/llvm/Config/abi-breaking.h.cmake",156)157 158# To enable diff testing out of tree159exports_files([160 "include/llvm/Config/config.h.cmake",161 "include/llvm/Config/llvm-config.h.cmake",162 "include/llvm/Config/abi-breaking.h.cmake",163])164 165td_library(166 name = "OptParserTdFiles",167 srcs = ["include/llvm/Option/OptParser.td"],168 includes = ["include"],169)170 171llvm_config_target_defines = [172 "LLVM_HAS_{}_TARGET=1".format(t)173 for t in llvm_targets174]175 176cc_library(177 name = "config",178 hdrs = [179 "include/llvm/Config/Targets.h",180 "include/llvm/Config/abi-breaking.h",181 "include/llvm/Config/llvm-config.h",182 ],183 copts = llvm_copts,184 defines = llvm_config_defines + llvm_config_target_defines,185 includes = ["include"],186 textual_hdrs = [187 "include/llvm/Config/AsmParsers.def",188 "include/llvm/Config/AsmPrinters.def",189 "include/llvm/Config/Disassemblers.def",190 "include/llvm/Config/Targets.def",191 "include/llvm/Config/TargetExegesis.def",192 "include/llvm/Config/TargetMCAs.def",193 # Needed for include scanner to find execinfo.h194 "include/llvm/Config/config.h",195 ],196)197 198cc_library(199 name = "Demangle",200 srcs = glob([201 "lib/Demangle/*.cpp",202 ]),203 hdrs = glob([204 "include/llvm/Demangle/*.h",205 "include/llvm/Demangle/*.def",206 ]),207 copts = llvm_copts,208 deps = [":config"],209)210 211genrule(212 name = "generate_vcs_revision",213 outs = ["include/llvm/Support/VCSRevision.h"],214 cmd = "echo '#undef LLVM_REVISION' >> $@\n" +215 "echo '#undef LLVM_REPOSITORY' >> $@\n",216)217 218genrule(219 name = "generate_static_extension_registry",220 outs = ["include/llvm/Support/Extension.def"],221 cmd = "echo -e '// extension handlers' >> $@\n" +222 "echo -e '#undef HANDLE_EXTENSION' >> $@\n",223)224 225cc_library(226 name = "Support",227 srcs = glob([228 "lib/Support/*.c",229 "lib/Support/*.cpp",230 "lib/Support/*.h",231 "lib/Support/*.inc",232 "lib/Support/LSP/*.cpp",233 # To avoid a dependency cycle.234 "include/llvm/Option/*.h",235 ]) + select({236 "@platforms//os:windows": glob([237 "lib/Support/Windows/*.inc",238 ]),239 "//conditions:default": glob([240 "lib/Support/Unix/*.h",241 "lib/Support/Unix/*.inc",242 ]),243 }) + [244 "lib/Support/BLAKE3/blake3.c",245 "lib/Support/BLAKE3/blake3_dispatch.c",246 "lib/Support/BLAKE3/blake3_impl.h",247 "lib/Support/BLAKE3/blake3_portable.c",248 "lib/Support/BLAKE3/llvm_blake3_prefix.h",249 ] + select({250 "@platforms//cpu:aarch64": [251 "lib/Support/BLAKE3/blake3_neon.c",252 ],253 "@platforms//cpu:x86_64": [254 "lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S",255 "lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S",256 "lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S",257 "lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S",258 ],259 "//conditions:default": [260 ],261 }),262 hdrs = glob([263 "include/llvm/Support/**/*.h",264 "include/llvm/ADT/*.h",265 ]) + [266 "include/llvm-c/Core.h",267 "include/llvm-c/DataTypes.h",268 "include/llvm-c/Deprecated.h",269 "include/llvm-c/DisassemblerTypes.h",270 "include/llvm-c/Error.h",271 "include/llvm-c/ErrorHandling.h",272 "include/llvm-c/ExternC.h",273 "include/llvm-c/Support.h",274 "include/llvm-c/Types.h",275 "include/llvm-c/Visibility.h",276 "include/llvm-c/blake3.h",277 "include/llvm/ExecutionEngine/JITSymbol.h",278 "include/llvm/Support/Extension.def",279 "include/llvm/Support/VCSRevision.h",280 ],281 copts = llvm_copts,282 defines = select({283 "@platforms//cpu:aarch64": [284 ],285 "//conditions:default": [286 "BLAKE3_USE_NEON=0",287 ],288 }) + select({289 "@platforms//cpu:x86_64": [290 ],291 "//conditions:default": [292 "BLAKE3_NO_AVX2",293 "BLAKE3_NO_AVX512",294 "BLAKE3_NO_SSE2",295 "BLAKE3_NO_SSE41",296 ],297 }),298 includes = ["include"],299 linkopts = select({300 "@platforms//os:windows": [301 "ws2_32.lib",302 "ntdll.lib",303 ],304 "@platforms//os:freebsd": [305 "-pthread",306 "-lexecinfo",307 "-ldl",308 "-lm",309 ],310 "@platforms//os:macos": [311 "-pthread",312 "-ldl",313 ],314 "//conditions:default": [315 "-pthread",316 "-ldl",317 "-lm",318 ],319 }),320 textual_hdrs = glob([321 "include/llvm/Support/*.def",322 ]),323 deps = [324 ":config",325 ":Demangle",326 "//third-party/siphash",327 # We unconditionally depend on the custom LLVM zlib wrapper. This will328 # be an empty library unless zlib is enabled, in which case it will329 # both provide the necessary dependencies and configuration defines.330 "//third-party:zlib",331 # We unconditionally depend on the custom LLVM zstd wrapper. This will332 # be an empty library unless zstd is enabled, in which case it will333 # both provide the necessary dependencies and configuration defines.334 "//third-party:zstd",335 ],336)337 338# Note: although FileCheck (the binary) is a test utility, some non-test339# targets depend on the FileCheck library target.340cc_library(341 name = "FileCheckLib",342 srcs = glob([343 "lib/FileCheck/*.cpp",344 "lib/FileCheck/*.h",345 ]),346 hdrs = glob(["include/llvm/FileCheck/*.h"]),347 copts = llvm_copts,348 deps = [":Support"],349)350 351cc_library(352 name = "LineEditor",353 srcs = glob([354 "lib/LineEditor/*.cpp",355 ]),356 hdrs = glob(["include/llvm/LineEditor/*.h"]),357 copts = llvm_copts,358 deps = [359 ":Support",360 ":config",361 ],362)363 364cc_library(365 name = "Option",366 srcs = glob([367 "lib/Option/*.cpp",368 ]),369 hdrs = glob(["include/llvm/Option/*.h"]),370 copts = llvm_copts,371 deps = [372 ":Support",373 ":config",374 ],375)376 377cc_library(378 name = "TableGen",379 srcs = glob([380 "lib/TableGen/*.cpp",381 "lib/TableGen/*.h",382 ]),383 hdrs = glob(["include/llvm/TableGen/*.h"]),384 copts = llvm_copts,385 deps = [386 ":FrontendDirective",387 ":Support",388 ":config",389 ],390)391 392# This exists to avoid circular dependencies.393cc_library(394 name = "ir_headers",395 hdrs = glob(396 [397 "include/llvm/*.h",398 "include/llvm/IR/*.h",399 ],400 exclude = [401 "include/llvm/LinkAllPasses.h",402 ],403 ) + [404 "include/llvm-c/Comdat.h",405 "include/llvm-c/DebugInfo.h",406 "include/llvm/IR/Value.def",407 ],408 copts = llvm_copts,409)410 411cc_library(412 name = "BinaryFormat",413 srcs = glob([414 "lib/BinaryFormat/*.cpp",415 ]),416 hdrs = glob([417 "include/llvm/BinaryFormat/*.h",418 ]),419 copts = llvm_copts,420 includes = ["include"],421 textual_hdrs = glob([422 "include/llvm/BinaryFormat/*.def",423 "include/llvm/BinaryFormat/ELFRelocs/*.def",424 ]),425 deps = [426 ":PPCTargetParser",427 ":Support",428 ":TargetParser",429 ],430)431 432cc_library(433 name = "DebugInfo",434 hdrs = glob(["include/llvm/DebugInfo/*.h"]),435 copts = llvm_copts,436 deps = [437 ":Object",438 ":Support",439 ],440)441 442cc_library(443 name = "DebugInfoMSF",444 srcs = glob([445 "lib/DebugInfo/MSF/*.cpp",446 ]),447 hdrs = glob(["include/llvm/DebugInfo/MSF/*.h"]),448 copts = llvm_copts,449 deps = [":Support"],450)451 452cc_library(453 name = "DebugInfoBTF",454 srcs = glob([455 "lib/DebugInfo/BTF/*.cpp",456 ]),457 hdrs = glob(["include/llvm/DebugInfo/BTF/*.h"]) + [458 "include/llvm/DebugInfo/BTF/BTF.def",459 ],460 copts = llvm_copts,461 deps = [462 ":DebugInfo",463 ":Object",464 ":Support",465 ],466)467 468cc_library(469 name = "DebugInfoCodeView",470 srcs = glob([471 "lib/DebugInfo/CodeView/*.cpp",472 ]),473 hdrs = glob([474 "include/llvm/DebugInfo/CodeView/*.h",475 ]),476 copts = llvm_copts,477 textual_hdrs = glob([478 "include/llvm/DebugInfo/CodeView/*.def",479 ]),480 deps = [481 ":BinaryFormat",482 ":DebugInfoMSF",483 ":Support",484 ],485)486 487cc_library(488 name = "DebugInfoLogicalView",489 srcs = glob([490 "lib/DebugInfo/LogicalView/**/*.cpp",491 ]),492 hdrs = glob([493 "include/llvm/DebugInfo/LogicalView/**/*.h",494 ]),495 copts = llvm_copts,496 deps = [497 ":BinaryFormat",498 ":DebugInfo",499 ":DebugInfoCodeView",500 ":DebugInfoDWARF",501 ":DebugInfoDWARFLowLevel",502 ":DebugInfoPDB",503 ":Demangle",504 ":MC",505 ":MCDisassembler",506 ":Object",507 ":Support",508 ],509)510 511cc_library(512 name = "DebugInfoPDB",513 srcs = glob([514 "lib/DebugInfo/PDB/*.cpp",515 "lib/DebugInfo/PDB/Native/*.cpp",516 ]),517 hdrs = glob([518 "include/llvm/DebugInfo/PDB/*.h",519 "include/llvm/DebugInfo/PDB/Native/*.h",520 ]),521 copts = llvm_copts,522 deps = [523 ":BinaryFormat",524 ":DebugInfo",525 ":DebugInfoBTF",526 ":DebugInfoCodeView",527 ":DebugInfoMSF",528 ":Object",529 ":Support",530 ":config",531 ],532)533 534cc_library(535 name = "Debuginfod",536 srcs = glob([537 "lib/Debuginfod/*.cpp",538 ]),539 hdrs = glob([540 "include/llvm/Debuginfod/*.h",541 ]),542 copts = llvm_copts,543 deps = [544 ":BinaryFormat",545 ":DebugInfoDWARF",546 ":Object",547 ":Support",548 ":Symbolize",549 ],550)551 552cc_library(553 name = "DWARFCFIChecker",554 srcs = glob([555 "lib/DWARFCFIChecker/*.cpp",556 "lib/DWARFCFIChecker/*.h",557 ]),558 hdrs = glob(["include/llvm/DWARFCFIChecker/*.h"]),559 copts = llvm_copts,560 deps = [561 ":BinaryFormat",562 ":DebugInfoDWARFLowLevel",563 ":MC",564 ":Support",565 ],566)567 568cc_library(569 name = "MC",570 srcs = glob([571 "lib/MC/*.cpp",572 ]),573 hdrs = glob([574 "include/llvm/MC/*.h",575 ]),576 copts = llvm_copts,577 deps = [578 ":BinaryFormat",579 ":DebugInfoCodeView",580 ":DebugInfoDWARFLowLevel",581 ":Support",582 ":TargetParser",583 ":config",584 ":ir_headers",585 ],586)587 588cc_library(589 name = "DebugInfoDWARF",590 srcs = glob([591 "lib/DebugInfo/DWARF/*.cpp",592 ]),593 hdrs = glob(["include/llvm/DebugInfo/DWARF/*.h"]),594 copts = llvm_copts,595 deps = [596 ":BinaryFormat",597 ":DebugInfo",598 ":DebugInfoDWARFLowLevel",599 ":MC",600 ":Object",601 ":Support",602 ":TargetParser",603 ],604)605 606cc_library(607 name = "DebugInfoDWARFLowLevel",608 srcs = glob([609 "lib/DebugInfo/DWARF/LowLevel/*.cpp",610 ]),611 hdrs = glob(["include/llvm/DebugInfo/DWARF/LowLevel/*.h"]),612 copts = llvm_copts,613 deps = [614 ":BinaryFormat",615 ":Support",616 ":TargetParser",617 ],618)619 620cc_library(621 name = "DebugInfoGSYM",622 srcs = glob([623 "lib/DebugInfo/GSYM/*.cpp",624 ]),625 hdrs = glob(["include/llvm/DebugInfo/GSYM/*.h"]),626 copts = llvm_copts,627 deps = [628 ":DebugInfo",629 ":DebugInfoDWARF",630 ":MC",631 ":Object",632 ":Support",633 ],634)635 636cc_library(637 name = "Symbolize",638 srcs = glob([639 "lib/DebugInfo/Symbolize/*.cpp",640 ]),641 hdrs = glob([642 "include/llvm/DebugInfo/Symbolize/*.h",643 "include/llvm/Debuginfod/*.h",644 ]),645 copts = llvm_copts,646 deps = [647 ":BinaryFormat",648 ":DebugInfo",649 ":DebugInfoBTF",650 ":DebugInfoDWARF",651 ":DebugInfoGSYM",652 ":DebugInfoPDB",653 ":Demangle",654 ":Object",655 ":Support",656 ":TargetParser",657 ],658)659 660# Command line flag to control which tools get included in the llvm driver binary.661# The macro also generates config_setting targets used by select_driver_tools().662generate_driver_selects(name = "driver-tools")663 664generate_driver_tools_def(665 name = "gen_llvm_driver_tools_def",666 out = "LLVMDriverTools.def",667 driver_tools = select_driver_tools(":driver-tools"),668)669 670# Workaround inability to put `.def` files into `srcs` with a library671cc_library(672 name = "llvm_driver_tools_def_lib",673 includes = ["."],674 textual_hdrs = ["LLVMDriverTools.def"],675)676 677cc_binary(678 name = "llvm",679 srcs = glob(["tools/llvm-driver/*.cpp"]),680 deps = [681 ":Support",682 ":llvm_driver_tools_def_lib",683 ] + select_driver_tools(":driver-tools"),684)685 686cc_binary(687 name = "llvm-min-tblgen",688 srcs = [689 "utils/TableGen/Basic/ARMTargetDefEmitter.cpp",690 "utils/TableGen/Basic/Attributes.cpp",691 "utils/TableGen/Basic/CodeGenIntrinsics.cpp",692 "utils/TableGen/Basic/CodeGenIntrinsics.h",693 "utils/TableGen/Basic/DirectiveEmitter.cpp",694 "utils/TableGen/Basic/IntrinsicEmitter.cpp",695 "utils/TableGen/Basic/RISCVTargetDefEmitter.cpp",696 "utils/TableGen/Basic/RuntimeLibcalls.cpp",697 "utils/TableGen/Basic/RuntimeLibcalls.h",698 "utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp",699 "utils/TableGen/Basic/SDNodeProperties.cpp",700 "utils/TableGen/Basic/SDNodeProperties.h",701 "utils/TableGen/Basic/SequenceToOffsetTable.h",702 "utils/TableGen/Basic/TableGen.cpp",703 "utils/TableGen/Basic/TableGen.h",704 "utils/TableGen/Basic/VTEmitter.cpp",705 "utils/TableGen/llvm-min-tblgen.cpp",706 ],707 copts = llvm_copts,708 stamp = 0,709 deps = [710 ":Support",711 ":TableGen",712 ":config",713 ],714)715 716cc_library(717 name = "TableGenGlobalISel",718 srcs = [719 "utils/TableGen/Common/GlobalISel/CodeExpander.cpp",720 ],721 hdrs = [722 # We have to include these headers here as well as in the `hdrs` below723 # to allow the `.cpp` files to use file-relative-inclusion to find724 # them, even though consumers of this library use inclusion relative to725 # `utils/TableGen` with the `strip_includes_prefix` of this library.726 # This mixture appears to be incompatible with header modules.727 "utils/TableGen/Common/GlobalISel/CodeExpander.h",728 "utils/TableGen/Common/GlobalISel/CodeExpansions.h",729 ],730 copts = llvm_copts,731 features = ["-header_modules"],732 strip_include_prefix = "utils/TableGen",733 deps = [734 ":CodeGenTypes",735 ":Support",736 ":TableGen",737 ":config",738 ],739)740 741cc_library(742 name = "llvm-tblgen-headers",743 textual_hdrs = glob(["utils/TableGen/*.def"]),744)745 746cc_binary(747 name = "llvm-tblgen",748 srcs = glob(749 [750 "utils/TableGen/*.cpp",751 "utils/TableGen/*.h",752 "utils/TableGen/Basic/*.cpp",753 "utils/TableGen/Basic/*.h",754 "utils/TableGen/Common/*.cpp",755 "utils/TableGen/Common/*.h",756 "utils/TableGen/Common/GlobalISel/*.cpp",757 "utils/TableGen/Common/GlobalISel/*.h",758 759 # Some tablegen sources include headers from MC, so these have to be760 # listed here. MC uses headers produced by tablegen, so it cannot be a761 # regular dependency.762 "include/llvm/MC/*.h",763 ],764 exclude = [765 "utils/TableGen/Common/GlobalISel/CodeExpander.cpp",766 "utils/TableGen/llvm-min-tblgen.cpp",767 ],768 ) + [769 "include/llvm/TargetParser/SubtargetFeature.h",770 ],771 copts = llvm_copts,772 includes = ["utils/TableGen"],773 stamp = 0,774 deps = [775 ":CodeGenTypes",776 ":Option",777 ":Support",778 ":TableGen",779 ":TableGenGlobalISel",780 ":TargetParser",781 ":config",782 ":llvm-tblgen-headers",783 ":vt_gen",784 ],785)786 787gentbl_cc_library(788 name = "target_library_info_gen",789 tbl_outs = {"include/llvm/Analysis/TargetLibraryInfo.inc": ["-gen-target-library-info"]},790 tblgen = ":llvm-tblgen",791 td_file = "include/llvm/Analysis/TargetLibraryInfo.td",792 deps = [":CommonTargetTdFiles"],793)794 795gentbl_cc_library(796 name = "intrinsic_enums_gen",797 tbl_outs = {"include/llvm/IR/IntrinsicEnums.inc": ["-gen-intrinsic-enums"]},798 tblgen = ":llvm-min-tblgen",799 td_file = "include/llvm/IR/Intrinsics.td",800 deps = [":CommonTargetTdFiles"],801)802 803gentbl_cc_library(804 name = "intrinsics_impl_gen",805 tbl_outs = {"include/llvm/IR/IntrinsicImpl.inc": ["-gen-intrinsic-impl"]},806 tblgen = ":llvm-min-tblgen",807 td_file = "include/llvm/IR/Intrinsics.td",808 deps = [":CommonTargetTdFiles"],809)810 811gentbl_cc_library(812 name = "runtime_libcalls_gen",813 tbl_outs = {"include/llvm/IR/RuntimeLibcalls.inc": ["-gen-runtime-libcalls"]},814 tblgen = ":llvm-min-tblgen",815 td_file = "include/llvm/IR/RuntimeLibcalls.td",816 deps = [817 ":IRTdFiles",818 ":TableGenTdFiles",819 ],820)821 822gentbl_cc_library(823 name = "vt_gen",824 tbl_outs = {"include/llvm/CodeGen/GenVT.inc": ["-gen-vt"]},825 tblgen = ":llvm-min-tblgen",826 td_file = "include/llvm/CodeGen/ValueTypes.td",827)828 829# Note that the intrinsics are not currently set up so they can be pruned for830# disabled targets.831llvm_target_intrinsics_list = [832 {833 "name": "AArch64",834 "intrinsic_prefix": "aarch64",835 },836 {837 "name": "AMDGPU",838 "intrinsic_prefix": "amdgcn",839 },840 {841 "name": "ARM",842 "intrinsic_prefix": "arm",843 },844 {845 "name": "BPF",846 "intrinsic_prefix": "bpf",847 },848 {849 "name": "DirectX",850 "intrinsic_prefix": "dx",851 },852 {853 "name": "Hexagon",854 "intrinsic_prefix": "hexagon",855 },856 {857 "name": "LoongArch",858 "intrinsic_prefix": "loongarch",859 },860 {861 "name": "Mips",862 "intrinsic_prefix": "mips",863 },864 {865 "name": "NVPTX",866 "intrinsic_prefix": "nvvm",867 },868 {869 "name": "PowerPC",870 "intrinsic_prefix": "ppc",871 },872 {873 "name": "R600",874 "intrinsic_prefix": "r600",875 },876 {877 "name": "RISCV",878 "intrinsic_prefix": "riscv",879 },880 {881 "name": "S390",882 "intrinsic_prefix": "s390",883 },884 {885 "name": "SPIRV",886 "intrinsic_prefix": "spv",887 },888 {889 "name": "VE",890 "intrinsic_prefix": "ve",891 },892 {893 "name": "WebAssembly",894 "intrinsic_prefix": "wasm",895 },896 {897 "name": "X86",898 "intrinsic_prefix": "x86",899 },900 {901 "name": "XCore",902 "intrinsic_prefix": "xcore",903 },904]905 906[[907 gentbl_cc_library(908 name = "intrinsic_" + target["name"] + "_gen",909 includes = ["include"],910 tbl_outs = {"include/llvm/IR/Intrinsics" + target["name"] + ".h": [911 "-gen-intrinsic-enums",912 "-intrinsic-prefix=" + target["intrinsic_prefix"],913 ]},914 tblgen = ":llvm-min-tblgen",915 td_file = "include/llvm/IR/Intrinsics.td",916 deps = [917 ":CodegenTdFiles",918 ":IRTdFiles",919 ],920 ),921] for target in llvm_target_intrinsics_list]922 923gentbl_cc_library(924 name = "attributes_gen",925 tbl_outs = {"include/llvm/IR/Attributes.inc": ["-gen-attrs"]},926 tblgen = ":llvm-min-tblgen",927 td_file = "include/llvm/IR/Attributes.td",928)929 930cc_library(931 name = "BitstreamReader",932 srcs = glob([933 "lib/Bitstream/Reader/*.cpp",934 ]),935 hdrs = [936 "include/llvm/Bitstream/BitCodeEnums.h",937 "include/llvm/Bitstream/BitCodes.h",938 "include/llvm/Bitstream/BitstreamReader.h",939 ],940 copts = llvm_copts,941 deps = [942 ":Support",943 ],944)945 946cc_library(947 name = "BitstreamWriter",948 hdrs = [949 "include/llvm/Bitstream/BitCodeEnums.h",950 "include/llvm/Bitstream/BitCodes.h",951 "include/llvm/Bitstream/BitstreamWriter.h",952 ],953 copts = llvm_copts,954 deps = [955 ":Support",956 ],957)958 959cc_library(960 name = "Remarks",961 srcs = glob(962 [963 "lib/Remarks/*.cpp",964 "lib/Remarks/*.h",965 ],966 exclude = ["lib/Remarks/RemarkLinker.cpp"],967 ),968 hdrs = glob(969 [970 "include/llvm/Remarks/*.h",971 ],972 exclude = ["include/llvm/Remarks/RemarkLinker.h"],973 ) + [974 "include/llvm-c/Remarks.h",975 ],976 copts = llvm_copts,977 deps = [978 ":BitstreamReader",979 ":BitstreamWriter",980 ":Support",981 ],982)983 984cc_library(985 name = "remark_linker",986 srcs = ["lib/Remarks/RemarkLinker.cpp"],987 hdrs = ["include/llvm/Remarks/RemarkLinker.h"],988 copts = llvm_copts,989 deps = [990 ":Object",991 ":Remarks",992 ":Support",993 ],994)995 996filegroup(997 name = "llvm_intrinsics_headers",998 srcs = [999 "include/llvm/IR/Intrinsics" + target["name"] + ".h"1000 for target in llvm_target_intrinsics_list1001 ],1002)1003 1004cc_library(1005 name = "Core",1006 srcs = glob([1007 "lib/IR/*.cpp",1008 "lib/IR/*.h",1009 ]),1010 hdrs = glob(1011 [1012 "include/llvm/*.h",1013 "include/llvm/IR/*.h",1014 ],1015 exclude = [1016 "include/llvm/LinkAllPasses.h",1017 ],1018 ) + [1019 "include/llvm-c/Comdat.h",1020 "include/llvm-c/DebugInfo.h",1021 "include/llvm/Analysis/SimplifyQuery.h",1022 "include/llvm/Analysis/ValueTracking.h",1023 "include/llvm/Analysis/WithCache.h",1024 "include/llvm/ProfileData/InstrProf.h",1025 "include/llvm/ProfileData/InstrProfData.inc",1026 ] + [":llvm_intrinsics_headers"],1027 copts = llvm_copts,1028 textual_hdrs = glob([1029 "include/llvm/IR/*.def",1030 ]),1031 deps = [1032 ":BinaryFormat",1033 ":Demangle",1034 ":Remarks",1035 ":Support",1036 ":TargetParser",1037 ":attributes_gen",1038 ":config",1039 ":intrinsic_enums_gen",1040 ":intrinsics_impl_gen",1041 ":runtime_libcalls_gen",1042 ],1043)1044 1045cc_library(1046 name = "BitReader",1047 srcs = glob([1048 "lib/Bitcode/Reader/*.cpp",1049 "lib/Bitcode/Reader/*.h",1050 ]),1051 hdrs = [1052 "include/llvm-c/BitReader.h",1053 "include/llvm/Bitcode/BitcodeAnalyzer.h",1054 "include/llvm/Bitcode/BitcodeCommon.h",1055 "include/llvm/Bitcode/BitcodeReader.h",1056 "include/llvm/Bitcode/LLVMBitCodes.h",1057 ],1058 copts = llvm_copts,1059 deps = [1060 ":BinaryFormat",1061 ":BitstreamReader",1062 ":Core",1063 ":Support",1064 ":TargetParser",1065 ":config",1066 ],1067)1068 1069cc_library(1070 name = "MCParser",1071 srcs = glob([1072 "lib/MC/MCParser/*.cpp",1073 ]),1074 hdrs = glob(["include/llvm/MC/MCParser/*.h"]),1075 copts = llvm_copts,1076 deps = [1077 ":BinaryFormat",1078 ":DebugInfoCodeView",1079 ":MC",1080 ":Support",1081 ":TargetParser",1082 ":config",1083 ],1084)1085 1086cc_library(1087 name = "Telemetry",1088 srcs = glob(["lib/Telemetry/*.cpp"]),1089 hdrs = glob(["include/llvm/Telemetry/*.h"]),1090 copts = llvm_copts,1091 includes = ["include"],1092 deps = [":Support"],1093)1094 1095cc_library(1096 name = "TextAPI",1097 srcs = glob(1098 [1099 "lib/TextAPI/**/*.cpp",1100 ],1101 exclude = ["lib/TextAPI/BinaryReader/**"],1102 ),1103 hdrs = glob(1104 [1105 "include/llvm/TextAPI/**/*.h",1106 "include/llvm/TextAPI/**/*.def",1107 "lib/TextAPI/**/*.h",1108 ],1109 exclude = [1110 "lib/TextAPI/BinaryReader/**",1111 "include/llvm/TextAPI/DylibReader.h",1112 ],1113 ),1114 copts = llvm_copts,1115 deps = [1116 ":BinaryFormat",1117 ":Support",1118 ":TargetParser",1119 ],1120)1121 1122cc_library(1123 name = "TextAPIBinaryReader",1124 srcs = glob([1125 "lib/TextAPI/BinaryReader/**/*.cpp",1126 ]),1127 hdrs = ["include/llvm/TextAPI/DylibReader.h"],1128 copts = llvm_copts,1129 deps = [1130 ":DebugInfoDWARF",1131 ":Object",1132 ":Support",1133 ":TargetParser",1134 ":TextAPI",1135 ],1136)1137 1138cc_library(1139 name = "ObjCopy",1140 srcs = glob([1141 "lib/ObjCopy/**/*.cpp",1142 "lib/ObjCopy/**/*.h",1143 ]),1144 hdrs = glob([1145 "include/llvm/ObjCopy/**/*.h",1146 ]),1147 copts = llvm_copts,1148 includes = ["lib/ObjCopy"],1149 deps = [1150 ":BinaryFormat",1151 ":MC",1152 ":Object",1153 ":ObjectYAML",1154 ":Option",1155 ":Support",1156 ":Target",1157 ":intrinsics_impl_gen",1158 ],1159)1160 1161cc_library(1162 name = "Object",1163 srcs = glob([1164 "lib/Object/*.cpp",1165 "lib/Object/*.h",1166 ]),1167 hdrs = glob([1168 "include/llvm/Object/*.h",1169 ]) + [1170 "include/llvm-c/Object.h",1171 ],1172 copts = llvm_copts,1173 deps = [1174 ":BinaryFormat",1175 ":BitReader",1176 ":Core",1177 ":IRReader",1178 ":MC",1179 ":MCParser",1180 ":Support",1181 ":TargetParser",1182 ":TextAPI",1183 ":config",1184 ],1185)1186 1187cc_library(1188 name = "ObjectYAML",1189 srcs = glob([1190 "lib/ObjectYAML/*.cpp",1191 ]),1192 hdrs = glob(["include/llvm/ObjectYAML/*.h"]),1193 copts = llvm_copts,1194 deps = [1195 ":BinaryFormat",1196 ":DebugInfoCodeView",1197 ":MC",1198 ":Object",1199 ":Support",1200 ":TargetParser",1201 ],1202)1203 1204cc_library(1205 name = "ProfileData",1206 srcs = glob([1207 "lib/ProfileData/*.cpp",1208 ]),1209 hdrs = glob([1210 "include/llvm/ProfileData/*.h",1211 "include/llvm/ProfileData/*.inc",1212 ]),1213 copts = llvm_copts,1214 deps = [1215 ":BitstreamReader",1216 ":BitstreamWriter",1217 ":Core",1218 ":DebugInfo",1219 ":DebugInfoDWARF",1220 ":DebugInfoDWARFLowLevel",1221 ":Demangle",1222 ":Object",1223 ":Support",1224 ":Symbolize",1225 ":TargetParser",1226 ":config",1227 ],1228)1229 1230cc_library(1231 name = "Coverage",1232 srcs = glob([1233 "lib/ProfileData/Coverage/*.cpp",1234 ]),1235 hdrs = glob(["include/llvm/ProfileData/Coverage/*.h"]),1236 copts = llvm_copts,1237 deps = [1238 ":BinaryFormat",1239 ":Object",1240 ":ProfileData",1241 ":Support",1242 ":TargetParser",1243 ],1244)1245 1246AnalysisFpExcSrcs = [1247 "lib/Analysis/ConstantFolding.cpp",1248]1249 1250cc_library(1251 name = "AnalysisFpExc",1252 srcs = AnalysisFpExcSrcs,1253 hdrs = glob(1254 [1255 "include/llvm/Analysis/*.h",1256 "include/llvm/Analysis/Utils/*.h",1257 ],1258 ),1259 copts = llvm_copts + ["-ftrapping-math"],1260 textual_hdrs = glob([1261 "include/llvm/Analysis/*.def",1262 ]),1263 deps = [1264 ":BinaryFormat",1265 ":Core",1266 ":Object",1267 ":ProfileData",1268 ":Support",1269 ":TargetParser",1270 ":config",1271 ":target_library_info_gen",1272 ],1273)1274 1275cc_library(1276 name = "Analysis",1277 srcs = glob(1278 [1279 "lib/Analysis/*.cpp",1280 ],1281 exclude = AnalysisFpExcSrcs,1282 ),1283 hdrs = glob(1284 [1285 "include/llvm/Analysis/*.h",1286 "include/llvm/Analysis/Utils/*.h",1287 ],1288 ) + [1289 "include/llvm-c/Analysis.h",1290 ],1291 copts = llvm_copts,1292 textual_hdrs = glob([1293 "include/llvm/Analysis/*.def",1294 ]),1295 deps = [1296 ":AnalysisFpExc",1297 ":BinaryFormat",1298 ":Core",1299 ":FrontendHLSL",1300 ":Object",1301 ":ProfileData",1302 ":Support",1303 ":TargetParser",1304 ":config",1305 ":target_library_info_gen",1306 ],1307)1308 1309cc_library(1310 name = "BitWriter",1311 srcs = glob([1312 "lib/Bitcode/Writer/*.cpp",1313 "lib/Bitcode/Writer/*.h",1314 ]),1315 hdrs = [1316 "include/llvm-c/BitWriter.h",1317 "include/llvm/Bitcode/BitcodeCommon.h",1318 "include/llvm/Bitcode/BitcodeConvenience.h",1319 "include/llvm/Bitcode/BitcodeWriter.h",1320 "include/llvm/Bitcode/BitcodeWriterPass.h",1321 "include/llvm/Bitcode/LLVMBitCodes.h",1322 ],1323 copts = llvm_copts,1324 deps = [1325 ":Analysis",1326 ":BinaryFormat",1327 ":BitReader",1328 ":BitstreamWriter",1329 ":Core",1330 ":MC",1331 ":Object",1332 ":ProfileData",1333 ":Support",1334 ":TargetParser",1335 ":config",1336 ],1337)1338 1339cc_library(1340 name = "Target",1341 srcs = glob([1342 "lib/Target/*.cpp",1343 ]),1344 hdrs = glob([1345 "include/llvm/Target/*.h",1346 ]) + [1347 "include/llvm-c/Target.h",1348 "include/llvm-c/TargetMachine.h",1349 ],1350 copts = llvm_copts,1351 deps = [1352 ":Analysis",1353 ":BinaryFormat",1354 ":Core",1355 ":MC",1356 ":Support",1357 ":TargetParser",1358 ":config",1359 ],1360)1361 1362filegroup(1363 name = "common_target_td_sources",1364 srcs = glob([1365 "include/llvm/Analysis/*.td",1366 "include/llvm/CodeGen/*.td",1367 "include/llvm/Frontend/Directive/*.td",1368 "include/llvm/IR/Intrinsics*.td",1369 "include/llvm/TableGen/*.td",1370 "include/llvm/Target/*.td",1371 "include/llvm/Target/GlobalISel/*.td",1372 ]),1373)1374 1375td_library(1376 name = "CodegenTdFiles",1377 srcs = glob(["include/llvm/CodeGen/*.td"]),1378 includes = ["include"],1379)1380 1381td_library(1382 name = "IRTdFiles",1383 srcs = glob(["include/llvm/IR/*.td"]),1384 includes = ["include"],1385)1386 1387td_library(1388 name = "TableGenTdFiles",1389 srcs = glob(["include/llvm/TableGen/*.td"]),1390 includes = ["include"],1391)1392 1393td_library(1394 name = "CommonTargetTdFiles",1395 srcs = [":common_target_td_sources"],1396 includes = ["include"],1397)1398 1399td_library(1400 name = "ArmTargetTdFiles",1401 srcs = glob([1402 "lib/Target/ARM/**/*.td",1403 ]),1404)1405 1406gentbl_cc_library(1407 name = "ARMTargetParserDefGen",1408 tbl_outs = {"include/llvm/TargetParser/ARMTargetParserDef.inc": ["-gen-arm-target-def"]},1409 tblgen = ":llvm-min-tblgen",1410 td_file = "lib/Target/ARM/ARM.td",1411 deps = [1412 ":ArmTargetTdFiles",1413 ":CommonTargetTdFiles",1414 ],1415)1416 1417td_library(1418 name = "AArch64TargetTdFiles",1419 srcs = glob([1420 "lib/Target/AArch64/**/*.td",1421 ]),1422)1423 1424gentbl_cc_library(1425 name = "AArch64TargetParserDefGen",1426 tbl_outs = {"include/llvm/TargetParser/AArch64TargetParserDef.inc": ["-gen-arm-target-def"]},1427 tblgen = ":llvm-min-tblgen",1428 td_file = "lib/Target/AArch64/AArch64.td",1429 deps = [1430 ":AArch64TargetTdFiles",1431 ":CommonTargetTdFiles",1432 ],1433)1434 1435td_library(1436 name = "RISCVTargetTdFiles",1437 srcs = glob([1438 "lib/Target/RISCV/**/*.td",1439 ]),1440)1441 1442td_library(1443 name = "PPCTargetTdFiles",1444 srcs = glob([1445 "lib/Target/PowerPC/**/*.td",1446 ]),1447)1448 1449gentbl_cc_library(1450 name = "RISCVTargetParserDefGen",1451 tbl_outs = {"include/llvm/TargetParser/RISCVTargetParserDef.inc": ["-gen-riscv-target-def"]},1452 tblgen = ":llvm-min-tblgen",1453 td_file = "lib/Target/RISCV/RISCV.td",1454 deps = [1455 ":CommonTargetTdFiles",1456 ":RISCVTargetTdFiles",1457 ],1458)1459 1460gentbl_cc_library(1461 name = "PPCGenTargetFeaturesGen",1462 tbl_outs = {"include/llvm/TargetParser/PPCGenTargetFeatures.inc": ["-gen-target-features"]},1463 tblgen = ":llvm-tblgen",1464 td_file = "lib/Target/PowerPC/PPC.td",1465 deps = [1466 ":CommonTargetTdFiles",1467 ":PPCTargetTdFiles",1468 ],1469)1470 1471cc_library(1472 name = "PPCTargetParser",1473 srcs = ["lib/TargetParser/PPCTargetParser.cpp"],1474 hdrs = ["include/llvm/TargetParser/PPCTargetParser.h"],1475 copts = llvm_copts,1476 includes = ["include"],1477 deps = [1478 ":PPCGenTargetFeaturesGen",1479 ":Support",1480 ":TargetParser",1481 ],1482)1483 1484cc_library(1485 name = "TargetParser",1486 srcs = glob(1487 [1488 "lib/TargetParser/*.cpp",1489 ],1490 exclude = ["lib/TargetParser/PPCTargetParser.cpp"],1491 ) + select({1492 "@platforms//os:windows": glob([1493 "lib/TargetParser/Windows/*.inc",1494 ]),1495 "//conditions:default": glob([1496 "lib/TargetParser/Unix/*.inc",1497 ]),1498 }),1499 hdrs = glob([1500 "include/llvm/TargetParser/*.h",1501 ]),1502 copts = llvm_copts,1503 includes = ["include"],1504 textual_hdrs = [1505 "include/llvm/TargetParser/AArch64CPUFeatures.inc",1506 "include/llvm/TargetParser/AArch64FeatPriorities.inc",1507 "include/llvm/TargetParser/AArch64TargetParserDef.inc",1508 "include/llvm/TargetParser/ARMTargetParserDef.inc",1509 "include/llvm/TargetParser/RISCVTargetParserDef.inc",1510 ] + glob([1511 "include/llvm/TargetParser/*.def",1512 ]),1513 deps = [1514 ":Support",1515 ":config",1516 ],1517)1518 1519cc_library(1520 name = "DWP",1521 srcs = glob([1522 "lib/DWP/*.cpp",1523 ]),1524 hdrs = glob(["include/llvm/DWP/*.h"]),1525 copts = llvm_copts,1526 deps = [1527 ":DebugInfoDWARF",1528 ":MC",1529 ":Object",1530 ":Support",1531 ":Target",1532 ],1533)1534 1535cc_library(1536 name = "TransformUtils",1537 srcs = glob([1538 "lib/Transforms/Utils/*.cpp",1539 ]),1540 hdrs = glob(["include/llvm/Transforms/Utils/*.h"]) + [1541 "include/llvm/Transforms/Utils.h",1542 ],1543 copts = llvm_copts,1544 deps = [1545 ":Analysis",1546 ":BinaryFormat",1547 ":BitWriter",1548 ":Core",1549 ":ProfileData",1550 ":Support",1551 ":Target",1552 ":TargetParser",1553 ":config",1554 ],1555)1556 1557td_library(1558 name = "AMDGPUTargetTdFiles",1559 srcs = glob([1560 "lib/Target/AMDGPU/**/*.td",1561 ]),1562)1563 1564gentbl_cc_library(1565 name = "InstCombineTableGen",1566 strip_include_prefix = "lib/Target/AMDGPU",1567 tbl_outs = {"lib/Target/AMDGPU/InstCombineTables.inc": ["-gen-searchable-tables"]},1568 tblgen = ":llvm-tblgen",1569 td_file = "lib/Target/AMDGPU/InstCombineTables.td",1570 deps = [1571 ":AMDGPUTargetTdFiles",1572 ":CommonTargetTdFiles",1573 ],1574)1575 1576cc_library(1577 name = "InstCombine",1578 srcs = glob([1579 "lib/Transforms/InstCombine/*.cpp",1580 "lib/Transforms/InstCombine/*.h",1581 ]),1582 hdrs = glob(["include/llvm/Transforms/InstCombine/*.h"]),1583 copts = llvm_copts,1584 deps = [1585 ":Analysis",1586 ":Core",1587 ":Support",1588 ":Target",1589 ":TransformUtils",1590 ":config",1591 ],1592)1593 1594cc_library(1595 name = "AggressiveInstCombine",1596 srcs = glob([1597 "lib/Transforms/AggressiveInstCombine/*.cpp",1598 "lib/Transforms/AggressiveInstCombine/*.h",1599 ]),1600 hdrs = [1601 "include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h",1602 ],1603 copts = llvm_copts,1604 deps = [1605 ":Analysis",1606 ":Core",1607 ":Support",1608 ":TransformUtils",1609 ],1610)1611 1612cc_library(1613 name = "Instrumentation",1614 srcs = glob([1615 "lib/Transforms/Instrumentation/*.cpp",1616 "lib/Transforms/Instrumentation/*.h",1617 "lib/Transforms/Instrumentation/*.inc",1618 ]),1619 hdrs = glob(["include/llvm/Transforms/Instrumentation/*.h"]) + [1620 "include/llvm/Transforms/Utils/Instrumentation.h",1621 ],1622 copts = llvm_copts,1623 deps = [1624 ":Analysis",1625 ":BinaryFormat",1626 ":Core",1627 ":Demangle",1628 ":MC",1629 ":ProfileData",1630 ":Scalar",1631 ":Support",1632 ":Target",1633 ":TargetParser",1634 ":TransformUtils",1635 ":config",1636 ],1637)1638 1639cc_library(1640 name = "ObjCARC",1641 srcs = glob([1642 "lib/Transforms/ObjCARC/*.cpp",1643 "lib/Transforms/ObjCARC/*.h",1644 ]),1645 hdrs = ["include/llvm/Transforms/ObjCARC.h"],1646 copts = llvm_copts,1647 deps = [1648 ":Analysis",1649 ":Core",1650 ":Support",1651 ":Target",1652 ":TargetParser",1653 ":TransformUtils",1654 ":config",1655 ],1656)1657 1658cc_library(1659 name = "SandboxIR",1660 srcs = glob([1661 "lib/SandboxIR/*.cpp",1662 ]),1663 hdrs = glob(["include/llvm/SandboxIR/*.h"]),1664 copts = llvm_copts,1665 textual_hdrs = ["include/llvm/SandboxIR/Values.def"],1666 deps = [1667 ":Analysis",1668 ":Core",1669 ":Support",1670 ],1671)1672 1673cc_library(1674 name = "Scalar",1675 srcs = glob([1676 "lib/Transforms/Scalar/*.cpp",1677 ]),1678 hdrs = glob(["include/llvm/Transforms/Scalar/*.h"]) + [1679 "include/llvm/Transforms/Scalar.h",1680 ],1681 copts = llvm_copts,1682 deps = [1683 ":AggressiveInstCombine",1684 ":Analysis",1685 ":BinaryFormat",1686 ":Core",1687 ":InstCombine",1688 ":ProfileData",1689 ":Support",1690 ":Target",1691 ":TransformUtils",1692 ":config",1693 ],1694)1695 1696cc_library(1697 name = "Vectorize",1698 srcs = glob([1699 "lib/Transforms/Vectorize/**/*.cpp",1700 "lib/Transforms/Vectorize/**/*.h",1701 ]),1702 hdrs = glob([1703 "include/llvm/Transforms/Vectorize/**/*.h",1704 ]),1705 copts = llvm_copts,1706 textual_hdrs = [1707 "lib/Transforms/Vectorize/SandboxVectorizer/Passes/PassRegistry.def",1708 ],1709 deps = [1710 ":Analysis",1711 ":Core",1712 ":SandboxIR",1713 ":Scalar",1714 ":Support",1715 ":Target",1716 ":TransformUtils",1717 ":config",1718 ],1719)1720 1721cc_library(1722 name = "FrontendDebug",1723 hdrs = glob([1724 "include/llvm/Frontend/Debug/*.h",1725 ]),1726 copts = llvm_copts,1727 deps = [1728 ":Support",1729 ],1730)1731 1732cc_library(1733 name = "FrontendDriver",1734 srcs = glob([1735 "lib/Frontend/Driver/*.cpp",1736 ]),1737 hdrs = glob([1738 "include/llvm/Frontend/Driver/*.h",1739 ]),1740 copts = llvm_copts,1741 deps = [1742 ":Analysis",1743 ":Core",1744 ":ProfileData",1745 ":Support",1746 ":TargetParser",1747 ],1748)1749 1750cc_library(1751 name = "FrontendHLSL",1752 srcs = glob([1753 "lib/Frontend/HLSL/*.cpp",1754 ]),1755 hdrs = glob([1756 "include/llvm/Frontend/HLSL/*.h",1757 ]),1758 copts = llvm_copts,1759 deps = [1760 ":BinaryFormat",1761 ":Core",1762 ":MC",1763 ":Support",1764 ],1765)1766 1767cc_library(1768 name = "FrontendOffloading",1769 srcs = glob([1770 "lib/Frontend/Offloading/*.cpp",1771 ]),1772 hdrs = glob([1773 "include/llvm/Frontend/Offloading/*.h",1774 ]),1775 copts = llvm_copts,1776 deps = [1777 ":BinaryFormat",1778 ":Core",1779 ":Object",1780 ":ObjectYAML",1781 ":Support",1782 ":TargetParser",1783 ":TransformUtils",1784 ],1785)1786 1787td_library(1788 name = "OmpTdFiles",1789 srcs = glob([1790 "include/llvm/Frontend/OpenMP/*.td",1791 "include/llvm/Frontend/Directive/*.td",1792 ]),1793 includes = ["include"],1794)1795 1796gentbl_filegroup(1797 name = "omp_gen",1798 tbl_outs = {"include/llvm/Frontend/OpenMP/OMP.h.inc": ["--gen-directive-decl"]},1799 tblgen = ":llvm-min-tblgen",1800 td_file = "include/llvm/Frontend/OpenMP/OMP.td",1801 deps = [":OmpTdFiles"],1802)1803 1804gentbl_filegroup(1805 name = "omp_gen_impl",1806 tbl_outs = {"include/llvm/Frontend/OpenMP/OMP.inc": ["--gen-directive-impl"]},1807 tblgen = ":llvm-min-tblgen",1808 td_file = "include/llvm/Frontend/OpenMP/OMP.td",1809 deps = [":OmpTdFiles"],1810)1811 1812cc_library(1813 name = "FrontendAtomic",1814 srcs = glob([1815 "lib/Frontend/Atomic/*.cpp",1816 ]),1817 hdrs = glob([1818 "include/llvm/Frontend/Atomic/*.h",1819 ]),1820 copts = llvm_copts,1821 deps = [1822 ":Core",1823 ":Support",1824 ],1825)1826 1827cc_library(1828 name = "FrontendOpenMP",1829 srcs = glob([1830 "lib/Frontend/OpenMP/*.cpp",1831 ]),1832 hdrs = glob([1833 "include/llvm/Frontend/OpenMP/*.h",1834 ]) + [1835 "include/llvm/Frontend/OpenMP/OMP.h.inc",1836 "include/llvm/Frontend/OpenMP/OMP.inc",1837 ],1838 copts = llvm_copts,1839 textual_hdrs = glob([1840 "include/llvm/Frontend/OpenMP/*.def",1841 ]),1842 deps = [1843 ":Analysis",1844 ":BitReader",1845 ":Core",1846 ":Demangle",1847 ":FrontendAtomic",1848 ":FrontendDirective",1849 ":FrontendOffloading",1850 ":MC",1851 ":Scalar",1852 ":Support",1853 ":Target",1854 ":TargetParser",1855 ":TransformUtils",1856 ],1857)1858 1859td_library(1860 name = "AccTdFiles",1861 srcs = glob([1862 "include/llvm/Frontend/OpenACC/*.td",1863 "include/llvm/Frontend/Directive/*.td",1864 ]),1865 includes = ["include"],1866)1867 1868gentbl_filegroup(1869 name = "acc_gen",1870 tbl_outs = {"include/llvm/Frontend/OpenACC/ACC.h.inc": ["--gen-directive-decl"]},1871 tblgen = ":llvm-min-tblgen",1872 td_file = "include/llvm/Frontend/OpenACC/ACC.td",1873 deps = [":AccTdFiles"],1874)1875 1876gentbl_filegroup(1877 name = "acc_gen_impl",1878 tbl_outs = {"include/llvm/Frontend/OpenACC/ACC.inc": ["--gen-directive-impl"]},1879 tblgen = ":llvm-min-tblgen",1880 td_file = "include/llvm/Frontend/OpenACC/ACC.td",1881 deps = [":AccTdFiles"],1882)1883 1884cc_library(1885 name = "FrontendDirective",1886 srcs = glob(["lib/Frontend/Directive/*.cpp"]),1887 hdrs = glob(["include/llvm/Frontend/Directive/*.h"]),1888 deps = [":Support"],1889)1890 1891cc_library(1892 name = "FrontendOpenACC",1893 srcs = glob([1894 "lib/Frontend/OpenACC/*.cpp",1895 ]) + [1896 "include/llvm/Frontend/OpenACC/ACC.inc",1897 ],1898 hdrs = ["include/llvm/Frontend/OpenACC/ACC.h.inc"],1899 copts = llvm_copts,1900 deps = [1901 ":Analysis",1902 ":Core",1903 ":FrontendDirective",1904 ":Support",1905 ":TransformUtils",1906 ],1907)1908 1909cc_library(1910 name = "AsmParser",1911 srcs = glob([1912 "lib/AsmParser/*.cpp",1913 ]),1914 hdrs = glob(["include/llvm/AsmParser/*.h"]),1915 copts = llvm_copts,1916 deps = [1917 ":BinaryFormat",1918 ":Core",1919 ":Support",1920 ":attributes_gen",1921 ],1922)1923 1924cc_library(1925 name = "IRPrinter",1926 srcs = glob([1927 "lib/IRPrinter/*.cpp",1928 ]),1929 hdrs = glob([1930 "include/llvm/IRPrinter/*.h",1931 ]),1932 copts = llvm_copts,1933 deps = [1934 ":Analysis",1935 ":Core",1936 ":Support",1937 ],1938)1939 1940cc_library(1941 name = "IRReader",1942 srcs = glob([1943 "lib/IRReader/*.cpp",1944 ]),1945 hdrs = glob([1946 "include/llvm/IRReader/*.h",1947 ]) + [1948 "include/llvm-c/IRReader.h",1949 ],1950 copts = llvm_copts,1951 deps = [1952 ":AsmParser",1953 ":BitReader",1954 ":Core",1955 ":Support",1956 ":config",1957 ],1958)1959 1960cc_library(1961 name = "Linker",1962 srcs = glob([1963 "lib/Linker/*.cpp",1964 "lib/Linker/*.h",1965 ]),1966 hdrs = glob([1967 "include/llvm/Linker/*.h",1968 ]) + [1969 "include/llvm-c/Linker.h",1970 ],1971 copts = llvm_copts,1972 deps = [1973 ":Core",1974 ":Object",1975 ":Support",1976 ":TargetParser",1977 ":TransformUtils",1978 ":config",1979 ],1980)1981 1982cc_library(1983 name = "IPO",1984 srcs = glob([1985 "lib/Transforms/IPO/*.cpp",1986 ]),1987 hdrs = glob([1988 "include/llvm/Transforms/IPO/*.h",1989 ]) + [1990 "include/llvm/Transforms/IPO.h",1991 ],1992 copts = llvm_copts,1993 deps = [1994 ":AggressiveInstCombine",1995 ":Analysis",1996 ":BinaryFormat",1997 ":BitReader",1998 ":BitWriter",1999 ":Core",2000 ":Demangle",2001 ":FrontendOpenMP",2002 ":IRPrinter",2003 ":IRReader",2004 ":InstCombine",2005 ":Instrumentation",2006 ":Linker",2007 ":ObjCARC",2008 ":Object",2009 ":ProfileData",2010 ":Scalar",2011 ":Support",2012 ":Target",2013 ":TargetParser",2014 ":TransformUtils",2015 ":Vectorize",2016 ":config",2017 ":ir_headers",2018 ],2019)2020 2021cc_library(2022 name = "CFGuard",2023 srcs = glob([2024 "lib/Transforms/CFGuard/*.cpp",2025 ]),2026 hdrs = ["include/llvm/Transforms/CFGuard.h"],2027 copts = llvm_copts,2028 deps = [2029 ":Core",2030 ":Support",2031 ":TargetParser",2032 ],2033)2034 2035cc_library(2036 name = "HipStdPar",2037 srcs = glob([2038 "lib/Transforms/HipStdPar/*.cpp",2039 ]),2040 hdrs = ["include/llvm/Transforms/HipStdPar/HipStdPar.h"],2041 copts = llvm_copts,2042 deps = [2043 ":Analysis",2044 ":Core",2045 ":Support",2046 ":TargetParser",2047 ":TransformUtils",2048 ],2049)2050 2051cc_library(2052 name = "Coroutines",2053 srcs = glob([2054 "lib/Transforms/Coroutines/*.cpp",2055 "lib/Transforms/Coroutines/*.h",2056 ]),2057 hdrs = glob(["include/llvm/Transforms/Coroutines/*.h"]),2058 copts = llvm_copts,2059 deps = [2060 ":Analysis",2061 ":BinaryFormat",2062 ":Core",2063 ":IPO",2064 ":Scalar",2065 ":Support",2066 ":TransformUtils",2067 ":config",2068 ],2069)2070 2071# Meta-target for clients which depend on all of the transforms libraries.2072cc_library(2073 name = "common_transforms",2074 deps = [2075 ":AggressiveInstCombine",2076 ":CFGuard",2077 ":Coroutines",2078 ":IPO",2079 ":InstCombine",2080 ":Instrumentation",2081 ":ObjCARC",2082 ":Scalar",2083 ":Vectorize",2084 ],2085)2086 2087cc_library(2088 name = "asm_printer_defs",2089 copts = llvm_copts,2090 textual_hdrs = glob(["lib/CodeGen/AsmPrinter/*.def"]),2091)2092 2093cc_library(2094 name = "CodeGenTypes",2095 srcs = glob([2096 "lib/CodeGenTypes/**/*.cpp",2097 ]),2098 hdrs = glob([2099 "include/llvm/CodeGenTypes/**/*.h",2100 ]),2101 copts = llvm_copts,2102 deps = [2103 ":Support",2104 ":vt_gen",2105 ],2106)2107 2108cc_library(2109 name = "CGData",2110 srcs = glob(["lib/CGData/**/*.cpp"]),2111 hdrs = glob([2112 "include/llvm/CGData/**/*.h",2113 "include/llvm/CGData/**/*.inc",2114 ]),2115 copts = llvm_copts,2116 deps = [2117 ":BitReader",2118 ":BitWriter",2119 ":Core",2120 ":Object",2121 ":ObjectYAML",2122 ":Support",2123 ":TargetParser",2124 ],2125)2126 2127cc_library(2128 name = "CodeGen",2129 srcs = glob(2130 [2131 "lib/CodeGen/**/*.cpp",2132 "lib/CodeGen/**/*.h",2133 "lib/CodeGen/SelectionDAG/*.cpp",2134 "lib/CodeGen/SelectionDAG/*.h",2135 ],2136 ),2137 hdrs = [2138 "include/llvm/LinkAllPasses.h",2139 ] + glob(2140 [2141 "include/llvm/CodeGen/**/*.h",2142 ],2143 ),2144 copts = llvm_copts,2145 textual_hdrs = glob([2146 "include/llvm/CodeGen/**/*.def",2147 ]),2148 deps = [2149 ":AggressiveInstCombine",2150 ":Analysis",2151 ":AsmParser",2152 ":BinaryFormat",2153 ":BitReader",2154 ":BitWriter",2155 ":CFGuard",2156 ":CGData",2157 ":CodeGenTypes",2158 ":Core",2159 ":DebugInfoCodeView",2160 ":DebugInfoDWARF",2161 ":DebugInfoDWARFLowLevel",2162 ":IPO",2163 ":IRPrinter",2164 ":Instrumentation",2165 ":MC",2166 ":MCParser",2167 ":ObjCARC",2168 ":Object",2169 ":ProfileData",2170 ":Remarks",2171 ":Scalar",2172 ":Support",2173 ":Target",2174 ":TargetParser",2175 ":TransformUtils",2176 ":asm_printer_defs",2177 ":config",2178 ":vt_gen",2179 ],2180)2181 2182cc_library(2183 name = "MCDisassembler",2184 srcs = glob([2185 "lib/MC/MCDisassembler/*.cpp",2186 "lib/MC/MCDisassembler/*.h",2187 ]),2188 hdrs = glob([2189 "include/llvm/MC/MCDisassembler/*.h",2190 ]) + [2191 "include/llvm-c/Disassembler.h",2192 ],2193 copts = llvm_copts,2194 deps = [2195 ":BinaryFormat",2196 ":MC",2197 ":Support",2198 ":TargetParser",2199 ":config",2200 ],2201)2202 2203llvm_target_lib_list = [lib for lib in [2204 {2205 "name": "AArch64",2206 "short_name": "AArch64",2207 "tbl_outs": [2208 (2209 ["-gen-register-bank"],2210 "lib/Target/AArch64/AArch64GenRegisterBank.inc",2211 ),2212 (2213 ["-gen-register-info"],2214 [2215 "lib/Target/AArch64/AArch64GenRegisterInfo.inc",2216 "lib/Target/AArch64/AArch64GenRegisterInfoEnums.inc",2217 "lib/Target/AArch64/AArch64GenRegisterInfoMCDesc.inc",2218 "lib/Target/AArch64/AArch64GenRegisterInfoHeader.inc",2219 "lib/Target/AArch64/AArch64GenRegisterInfoTargetDesc.inc",2220 ],2221 ),2222 (2223 ["-gen-instr-info"],2224 "lib/Target/AArch64/AArch64GenInstrInfo.inc",2225 ),2226 (2227 ["-gen-emitter"],2228 "lib/Target/AArch64/AArch64GenMCCodeEmitter.inc",2229 ),2230 (2231 ["-gen-pseudo-lowering"],2232 "lib/Target/AArch64/AArch64GenMCPseudoLowering.inc",2233 ),2234 (2235 ["-gen-asm-writer"],2236 "lib/Target/AArch64/AArch64GenAsmWriter.inc",2237 ),2238 (2239 [2240 "-gen-asm-writer",2241 "-asmwriternum=1",2242 ],2243 "lib/Target/AArch64/AArch64GenAsmWriter1.inc",2244 ),2245 (2246 ["-gen-asm-matcher"],2247 "lib/Target/AArch64/AArch64GenAsmMatcher.inc",2248 ),2249 (2250 ["-gen-dag-isel"],2251 "lib/Target/AArch64/AArch64GenDAGISel.inc",2252 ),2253 (2254 ["-gen-fast-isel"],2255 "lib/Target/AArch64/AArch64GenFastISel.inc",2256 ),2257 (2258 ["-gen-global-isel"],2259 "lib/Target/AArch64/AArch64GenGlobalISel.inc",2260 ),2261 (2262 [2263 "-gen-global-isel-combiner",2264 "-combiners=AArch64O0PreLegalizerCombiner",2265 ],2266 "lib/Target/AArch64/AArch64GenO0PreLegalizeGICombiner.inc",2267 ),2268 (2269 [2270 "-gen-global-isel-combiner",2271 "-combiners=AArch64PreLegalizerCombiner",2272 ],2273 "lib/Target/AArch64/AArch64GenPreLegalizeGICombiner.inc",2274 ),2275 (2276 [2277 "-gen-global-isel-combiner",2278 "-combiners=AArch64PostLegalizerCombiner",2279 ],2280 "lib/Target/AArch64/AArch64GenPostLegalizeGICombiner.inc",2281 ),2282 (2283 [2284 "-gen-global-isel-combiner",2285 "-combiners=AArch64PostLegalizerLowering",2286 ],2287 "lib/Target/AArch64/AArch64GenPostLegalizeGILowering.inc",2288 ),2289 (2290 ["-gen-callingconv"],2291 "lib/Target/AArch64/AArch64GenCallingConv.inc",2292 ),2293 (2294 ["-gen-sd-node-info"],2295 "lib/Target/AArch64/AArch64GenSDNodeInfo.inc",2296 ),2297 (2298 ["-gen-subtarget"],2299 "lib/Target/AArch64/AArch64GenSubtargetInfo.inc",2300 ),2301 (2302 ["-gen-disassembler"],2303 "lib/Target/AArch64/AArch64GenDisassemblerTables.inc",2304 ),2305 (2306 ["-gen-searchable-tables"],2307 "lib/Target/AArch64/AArch64GenSystemOperands.inc",2308 ),2309 (2310 ["-gen-exegesis"],2311 "lib/Target/AArch64/AArch64GenExegesis.inc",2312 ),2313 ],2314 },2315 {2316 "name": "ARM",2317 "short_name": "ARM",2318 "tbl_outs": [2319 (2320 ["-gen-register-bank"],2321 "lib/Target/ARM/ARMGenRegisterBank.inc",2322 ),2323 (2324 ["-gen-register-info"],2325 [2326 "lib/Target/ARM/ARMGenRegisterInfo.inc",2327 "lib/Target/ARM/ARMGenRegisterInfoEnums.inc",2328 "lib/Target/ARM/ARMGenRegisterInfoMCDesc.inc",2329 "lib/Target/ARM/ARMGenRegisterInfoHeader.inc",2330 "lib/Target/ARM/ARMGenRegisterInfoTargetDesc.inc",2331 ],2332 ),2333 (2334 ["-gen-searchable-tables"],2335 "lib/Target/ARM/ARMGenSystemRegister.inc",2336 ),2337 (2338 ["-gen-instr-info"],2339 "lib/Target/ARM/ARMGenInstrInfo.inc",2340 ),2341 (2342 ["-gen-emitter"],2343 "lib/Target/ARM/ARMGenMCCodeEmitter.inc",2344 ),2345 (2346 ["-gen-pseudo-lowering"],2347 "lib/Target/ARM/ARMGenMCPseudoLowering.inc",2348 ),2349 (2350 ["-gen-asm-writer"],2351 "lib/Target/ARM/ARMGenAsmWriter.inc",2352 ),2353 (2354 ["-gen-asm-matcher"],2355 "lib/Target/ARM/ARMGenAsmMatcher.inc",2356 ),2357 (2358 ["-gen-dag-isel"],2359 "lib/Target/ARM/ARMGenDAGISel.inc",2360 ),2361 (2362 ["-gen-fast-isel"],2363 "lib/Target/ARM/ARMGenFastISel.inc",2364 ),2365 (2366 ["-gen-global-isel"],2367 "lib/Target/ARM/ARMGenGlobalISel.inc",2368 ),2369 (2370 ["-gen-callingconv"],2371 "lib/Target/ARM/ARMGenCallingConv.inc",2372 ),2373 (2374 ["-gen-sd-node-info"],2375 "lib/Target/ARM/ARMGenSDNodeInfo.inc",2376 ),2377 (2378 ["-gen-subtarget"],2379 "lib/Target/ARM/ARMGenSubtargetInfo.inc",2380 ),2381 (2382 ["-gen-disassembler"],2383 "lib/Target/ARM/ARMGenDisassemblerTables.inc",2384 ),2385 ],2386 },2387 {2388 "name": "AMDGPU",2389 "short_name": "AMDGPU",2390 "tbl_outs": [2391 (2392 ["-gen-register-bank"],2393 "lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc",2394 ),2395 (2396 ["-gen-register-info"],2397 [2398 "lib/Target/AMDGPU/AMDGPUGenRegisterInfo.inc",2399 "lib/Target/AMDGPU/AMDGPUGenRegisterInfoEnums.inc",2400 "lib/Target/AMDGPU/AMDGPUGenRegisterInfoMCDesc.inc",2401 "lib/Target/AMDGPU/AMDGPUGenRegisterInfoHeader.inc",2402 "lib/Target/AMDGPU/AMDGPUGenRegisterInfoTargetDesc.inc",2403 ],2404 ),2405 (2406 ["-gen-instr-info"],2407 "lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc",2408 ),2409 (2410 ["-gen-emitter"],2411 "lib/Target/AMDGPU/AMDGPUGenMCCodeEmitter.inc",2412 ),2413 (2414 ["-gen-pseudo-lowering"],2415 "lib/Target/AMDGPU/AMDGPUGenMCPseudoLowering.inc",2416 ),2417 (2418 ["-gen-asm-writer"],2419 "lib/Target/AMDGPU/AMDGPUGenAsmWriter.inc",2420 ),2421 (2422 ["-gen-asm-matcher"],2423 "lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc",2424 ),2425 (2426 ["-gen-dag-isel"],2427 "lib/Target/AMDGPU/AMDGPUGenDAGISel.inc",2428 ),2429 (2430 ["-gen-callingconv"],2431 "lib/Target/AMDGPU/AMDGPUGenCallingConv.inc",2432 ),2433 (2434 ["-gen-subtarget"],2435 "lib/Target/AMDGPU/AMDGPUGenSubtargetInfo.inc",2436 ),2437 (2438 [2439 "-gen-disassembler",2440 "--specialize-decoders-per-bitwidth",2441 "-ignore-non-decodable-operands",2442 "-ignore-fully-defined-operands",2443 ],2444 "lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc",2445 ),2446 (2447 ["-gen-searchable-tables"],2448 "lib/Target/AMDGPU/AMDGPUGenSearchableTables.inc",2449 ),2450 (2451 ["-gen-sd-node-info"],2452 "lib/Target/AMDGPU/AMDGPUGenSDNodeInfo.inc",2453 ),2454 ],2455 "tbl_deps": [2456 ":InstCombineTableGen",2457 ":amdgpu_isel_target_gen",2458 ":r600_target_gen",2459 ],2460 },2461 {2462 "name": "AVR",2463 "short_name": "AVR",2464 "tbl_outs": [2465 (2466 ["-gen-asm-matcher"],2467 "lib/Target/AVR/AVRGenAsmMatcher.inc",2468 ),2469 (2470 ["-gen-asm-writer"],2471 "lib/Target/AVR/AVRGenAsmWriter.inc",2472 ),2473 (2474 ["-gen-callingconv"],2475 "lib/Target/AVR/AVRGenCallingConv.inc",2476 ),2477 (2478 ["-gen-dag-isel"],2479 "lib/Target/AVR/AVRGenDAGISel.inc",2480 ),2481 (2482 ["-gen-disassembler"],2483 "lib/Target/AVR/AVRGenDisassemblerTables.inc",2484 ),2485 (2486 ["-gen-emitter"],2487 "lib/Target/AVR/AVRGenMCCodeEmitter.inc",2488 ),2489 (2490 ["-gen-instr-info"],2491 "lib/Target/AVR/AVRGenInstrInfo.inc",2492 ),2493 (2494 ["-gen-register-info"],2495 [2496 "lib/Target/AVR/AVRGenRegisterInfo.inc",2497 "lib/Target/AVR/AVRGenRegisterInfoEnums.inc",2498 "lib/Target/AVR/AVRGenRegisterInfoMCDesc.inc",2499 "lib/Target/AVR/AVRGenRegisterInfoHeader.inc",2500 "lib/Target/AVR/AVRGenRegisterInfoTargetDesc.inc",2501 ],2502 ),2503 (2504 ["-gen-sd-node-info"],2505 "lib/Target/AVR/AVRGenSDNodeInfo.inc",2506 ),2507 (2508 ["-gen-subtarget"],2509 "lib/Target/AVR/AVRGenSubtargetInfo.inc",2510 ),2511 ],2512 },2513 {2514 "name": "BPF",2515 "short_name": "BPF",2516 "tbl_outs": [2517 (2518 ["-gen-register-bank"],2519 "lib/Target/BPF/BPFGenRegisterBank.inc",2520 ),2521 (2522 ["-gen-asm-writer"],2523 "lib/Target/BPF/BPFGenAsmWriter.inc",2524 ),2525 (2526 ["-gen-asm-matcher"],2527 "lib/Target/BPF/BPFGenAsmMatcher.inc",2528 ),2529 (2530 ["-gen-callingconv"],2531 "lib/Target/BPF/BPFGenCallingConv.inc",2532 ),2533 (2534 ["-gen-dag-isel"],2535 "lib/Target/BPF/BPFGenDAGISel.inc",2536 ),2537 (2538 ["-gen-global-isel"],2539 "lib/Target/BPF/BPFGenGlobalISel.inc",2540 ),2541 (2542 ["-gen-disassembler"],2543 "lib/Target/BPF/BPFGenDisassemblerTables.inc",2544 ),2545 (2546 ["-gen-emitter"],2547 "lib/Target/BPF/BPFGenMCCodeEmitter.inc",2548 ),2549 (2550 ["-gen-instr-info"],2551 "lib/Target/BPF/BPFGenInstrInfo.inc",2552 ),2553 (2554 ["-gen-register-info"],2555 [2556 "lib/Target/BPF/BPFGenRegisterInfo.inc",2557 "lib/Target/BPF/BPFGenRegisterInfoEnums.inc",2558 "lib/Target/BPF/BPFGenRegisterInfoMCDesc.inc",2559 "lib/Target/BPF/BPFGenRegisterInfoHeader.inc",2560 "lib/Target/BPF/BPFGenRegisterInfoTargetDesc.inc",2561 ],2562 ),2563 (2564 ["-gen-subtarget"],2565 "lib/Target/BPF/BPFGenSubtargetInfo.inc",2566 ),2567 (2568 ["-gen-sd-node-info"],2569 "lib/Target/BPF/BPFGenSDNodeInfo.inc",2570 ),2571 ],2572 },2573 {2574 "name": "Hexagon",2575 "short_name": "Hexagon",2576 "tbl_outs": [2577 (2578 ["-gen-asm-matcher"],2579 "lib/Target/Hexagon/HexagonGenAsmMatcher.inc",2580 ),2581 (2582 ["-gen-asm-writer"],2583 "lib/Target/Hexagon/HexagonGenAsmWriter.inc",2584 ),2585 (2586 ["-gen-callingconv"],2587 "lib/Target/Hexagon/HexagonGenCallingConv.inc",2588 ),2589 (2590 ["-gen-dag-isel"],2591 "lib/Target/Hexagon/HexagonGenDAGISel.inc",2592 ),2593 (2594 ["-gen-dfa-packetizer"],2595 "lib/Target/Hexagon/HexagonGenDFAPacketizer.inc",2596 ),2597 (2598 ["-gen-disassembler"],2599 "lib/Target/Hexagon/HexagonGenDisassemblerTables.inc",2600 ),2601 (2602 ["-gen-instr-info"],2603 "lib/Target/Hexagon/HexagonGenInstrInfo.inc",2604 ),2605 (2606 ["-gen-emitter"],2607 "lib/Target/Hexagon/HexagonGenMCCodeEmitter.inc",2608 ),2609 (2610 ["-gen-register-info"],2611 [2612 "lib/Target/Hexagon/HexagonGenRegisterInfo.inc",2613 "lib/Target/Hexagon/HexagonGenRegisterInfoEnums.inc",2614 "lib/Target/Hexagon/HexagonGenRegisterInfoMCDesc.inc",2615 "lib/Target/Hexagon/HexagonGenRegisterInfoHeader.inc",2616 "lib/Target/Hexagon/HexagonGenRegisterInfoTargetDesc.inc",2617 ],2618 ),2619 (2620 ["-gen-subtarget"],2621 "lib/Target/Hexagon/HexagonGenSubtargetInfo.inc",2622 ),2623 ],2624 },2625 {2626 "name": "Lanai",2627 "short_name": "Lanai",2628 "tbl_outs": [2629 (2630 ["-gen-asm-matcher"],2631 "lib/Target/Lanai/LanaiGenAsmMatcher.inc",2632 ),2633 (2634 ["-gen-asm-writer"],2635 "lib/Target/Lanai/LanaiGenAsmWriter.inc",2636 ),2637 (2638 ["-gen-callingconv"],2639 "lib/Target/Lanai/LanaiGenCallingConv.inc",2640 ),2641 (2642 ["-gen-dag-isel"],2643 "lib/Target/Lanai/LanaiGenDAGISel.inc",2644 ),2645 (2646 ["-gen-disassembler"],2647 "lib/Target/Lanai/LanaiGenDisassemblerTables.inc",2648 ),2649 (2650 ["-gen-emitter"],2651 "lib/Target/Lanai/LanaiGenMCCodeEmitter.inc",2652 ),2653 (2654 ["-gen-instr-info"],2655 "lib/Target/Lanai/LanaiGenInstrInfo.inc",2656 ),2657 (2658 ["-gen-register-info"],2659 [2660 "lib/Target/Lanai/LanaiGenRegisterInfo.inc",2661 "lib/Target/Lanai/LanaiGenRegisterInfoEnums.inc",2662 "lib/Target/Lanai/LanaiGenRegisterInfoMCDesc.inc",2663 "lib/Target/Lanai/LanaiGenRegisterInfoHeader.inc",2664 "lib/Target/Lanai/LanaiGenRegisterInfoTargetDesc.inc",2665 ],2666 ),2667 (2668 ["-gen-sd-node-info"],2669 "lib/Target/Lanai/LanaiGenSDNodeInfo.inc",2670 ),2671 (2672 ["-gen-subtarget"],2673 "lib/Target/Lanai/LanaiGenSubtargetInfo.inc",2674 ),2675 ],2676 },2677 {2678 "name": "LoongArch",2679 "short_name": "LoongArch",2680 "tbl_outs": [2681 (2682 ["-gen-asm-matcher"],2683 "lib/Target/LoongArch/LoongArchGenAsmMatcher.inc",2684 ),2685 (2686 ["-gen-asm-writer"],2687 "lib/Target/LoongArch/LoongArchGenAsmWriter.inc",2688 ),2689 (2690 ["-gen-dag-isel"],2691 "lib/Target/LoongArch/LoongArchGenDAGISel.inc",2692 ),2693 (2694 ["-gen-disassembler"],2695 "lib/Target/LoongArch/LoongArchGenDisassemblerTables.inc",2696 ),2697 (2698 ["-gen-emitter"],2699 "lib/Target/LoongArch/LoongArchGenMCCodeEmitter.inc",2700 ),2701 (2702 ["-gen-instr-info"],2703 "lib/Target/LoongArch/LoongArchGenInstrInfo.inc",2704 ),2705 (2706 ["-gen-pseudo-lowering"],2707 "lib/Target/LoongArch/LoongArchGenMCPseudoLowering.inc",2708 ),2709 (2710 ["-gen-register-info"],2711 [2712 "lib/Target/LoongArch/LoongArchGenRegisterInfo.inc",2713 "lib/Target/LoongArch/LoongArchGenRegisterInfoEnums.inc",2714 "lib/Target/LoongArch/LoongArchGenRegisterInfoMCDesc.inc",2715 "lib/Target/LoongArch/LoongArchGenRegisterInfoHeader.inc",2716 "lib/Target/LoongArch/LoongArchGenRegisterInfoTargetDesc.inc",2717 ],2718 ),2719 (2720 ["-gen-sd-node-info"],2721 "lib/Target/LoongArch/LoongArchGenSDNodeInfo.inc",2722 ),2723 (2724 ["-gen-subtarget"],2725 "lib/Target/LoongArch/LoongArchGenSubtargetInfo.inc",2726 ),2727 ],2728 },2729 {2730 "name": "Mips",2731 "short_name": "Mips",2732 "tbl_outs": [2733 (2734 ["-gen-asm-matcher"],2735 "lib/Target/Mips/MipsGenAsmMatcher.inc",2736 ),2737 (2738 ["-gen-asm-writer"],2739 "lib/Target/Mips/MipsGenAsmWriter.inc",2740 ),2741 (2742 ["-gen-callingconv"],2743 "lib/Target/Mips/MipsGenCallingConv.inc",2744 ),2745 (2746 ["-gen-dag-isel"],2747 "lib/Target/Mips/MipsGenDAGISel.inc",2748 ),2749 (2750 [2751 "-gen-disassembler",2752 "-ignore-non-decodable-operands",2753 ],2754 "lib/Target/Mips/MipsGenDisassemblerTables.inc",2755 ),2756 (2757 ["-gen-emitter"],2758 "lib/Target/Mips/MipsGenMCCodeEmitter.inc",2759 ),2760 (2761 ["-gen-exegesis"],2762 "lib/Target/Mips/MipsGenExegesis.inc",2763 ),2764 (2765 ["-gen-fast-isel"],2766 "lib/Target/Mips/MipsGenFastISel.inc",2767 ),2768 (2769 ["-gen-global-isel"],2770 "lib/Target/Mips/MipsGenGlobalISel.inc",2771 ),2772 (2773 [2774 "-gen-global-isel-combiner",2775 "-combiners=MipsPostLegalizerCombiner",2776 ],2777 "lib/Target/Mips/MipsGenPostLegalizeGICombiner.inc",2778 ),2779 (2780 ["-gen-instr-info"],2781 "lib/Target/Mips/MipsGenInstrInfo.inc",2782 ),2783 (2784 ["-gen-pseudo-lowering"],2785 "lib/Target/Mips/MipsGenMCPseudoLowering.inc",2786 ),2787 (2788 ["-gen-register-bank"],2789 "lib/Target/Mips/MipsGenRegisterBank.inc",2790 ),2791 (2792 ["-gen-register-info"],2793 [2794 "lib/Target/Mips/MipsGenRegisterInfo.inc",2795 "lib/Target/Mips/MipsGenRegisterInfoEnums.inc",2796 "lib/Target/Mips/MipsGenRegisterInfoMCDesc.inc",2797 "lib/Target/Mips/MipsGenRegisterInfoHeader.inc",2798 "lib/Target/Mips/MipsGenRegisterInfoTargetDesc.inc",2799 ],2800 ),2801 (2802 ["-gen-subtarget"],2803 "lib/Target/Mips/MipsGenSubtargetInfo.inc",2804 ),2805 ],2806 },2807 {2808 "name": "MSP430",2809 "short_name": "MSP430",2810 "tbl_outs": [2811 (2812 ["-gen-asm-matcher"],2813 "lib/Target/MSP430/MSP430GenAsmMatcher.inc",2814 ),2815 (2816 ["-gen-asm-writer"],2817 "lib/Target/MSP430/MSP430GenAsmWriter.inc",2818 ),2819 (2820 ["-gen-callingconv"],2821 "lib/Target/MSP430/MSP430GenCallingConv.inc",2822 ),2823 (2824 ["-gen-dag-isel"],2825 "lib/Target/MSP430/MSP430GenDAGISel.inc",2826 ),2827 (2828 ["-gen-disassembler"],2829 "lib/Target/MSP430/MSP430GenDisassemblerTables.inc",2830 ),2831 (2832 ["-gen-instr-info"],2833 "lib/Target/MSP430/MSP430GenInstrInfo.inc",2834 ),2835 (2836 ["-gen-emitter"],2837 "lib/Target/MSP430/MSP430GenMCCodeEmitter.inc",2838 ),2839 (2840 ["-gen-register-info"],2841 [2842 "lib/Target/MSP430/MSP430GenRegisterInfo.inc",2843 "lib/Target/MSP430/MSP430GenRegisterInfoEnums.inc",2844 "lib/Target/MSP430/MSP430GenRegisterInfoMCDesc.inc",2845 "lib/Target/MSP430/MSP430GenRegisterInfoHeader.inc",2846 "lib/Target/MSP430/MSP430GenRegisterInfoTargetDesc.inc",2847 ],2848 ),2849 (2850 ["-gen-sd-node-info"],2851 "lib/Target/MSP430/MSP430GenSDNodeInfo.inc",2852 ),2853 (2854 ["-gen-subtarget"],2855 "lib/Target/MSP430/MSP430GenSubtargetInfo.inc",2856 ),2857 ],2858 },2859 {2860 "name": "NVPTX",2861 "short_name": "NVPTX",2862 "tbl_outs": [2863 (2864 ["-gen-register-info"],2865 [2866 "lib/Target/NVPTX/NVPTXGenRegisterInfo.inc",2867 "lib/Target/NVPTX/NVPTXGenRegisterInfoEnums.inc",2868 "lib/Target/NVPTX/NVPTXGenRegisterInfoMCDesc.inc",2869 "lib/Target/NVPTX/NVPTXGenRegisterInfoHeader.inc",2870 "lib/Target/NVPTX/NVPTXGenRegisterInfoTargetDesc.inc",2871 ],2872 ),2873 (2874 ["-gen-instr-info"],2875 "lib/Target/NVPTX/NVPTXGenInstrInfo.inc",2876 ),2877 (2878 ["-gen-asm-writer"],2879 "lib/Target/NVPTX/NVPTXGenAsmWriter.inc",2880 ),2881 (2882 ["-gen-dag-isel"],2883 "lib/Target/NVPTX/NVPTXGenDAGISel.inc",2884 ),2885 (2886 ["-gen-subtarget"],2887 "lib/Target/NVPTX/NVPTXGenSubtargetInfo.inc",2888 ),2889 (2890 ["-gen-sd-node-info"],2891 "lib/Target/NVPTX/NVPTXGenSDNodeInfo.inc",2892 ),2893 ],2894 },2895 {2896 "name": "PowerPC",2897 "short_name": "PPC",2898 "tbl_outs": [2899 (2900 ["-gen-asm-writer"],2901 "lib/Target/PowerPC/PPCGenAsmWriter.inc",2902 ),2903 (2904 ["-gen-asm-matcher"],2905 "lib/Target/PowerPC/PPCGenAsmMatcher.inc",2906 ),2907 (2908 ["-gen-emitter"],2909 "lib/Target/PowerPC/PPCGenMCCodeEmitter.inc",2910 ),2911 (2912 ["-gen-register-info"],2913 [2914 "lib/Target/PowerPC/PPCGenRegisterInfo.inc",2915 "lib/Target/PowerPC/PPCGenRegisterInfoEnums.inc",2916 "lib/Target/PowerPC/PPCGenRegisterInfoMCDesc.inc",2917 "lib/Target/PowerPC/PPCGenRegisterInfoHeader.inc",2918 "lib/Target/PowerPC/PPCGenRegisterInfoTargetDesc.inc",2919 ],2920 ),2921 (2922 ["-gen-instr-info"],2923 "lib/Target/PowerPC/PPCGenInstrInfo.inc",2924 ),2925 (2926 ["-gen-dag-isel"],2927 "lib/Target/PowerPC/PPCGenDAGISel.inc",2928 ),2929 (2930 ["-gen-fast-isel"],2931 "lib/Target/PowerPC/PPCGenFastISel.inc",2932 ),2933 (2934 ["-gen-callingconv"],2935 "lib/Target/PowerPC/PPCGenCallingConv.inc",2936 ),2937 (2938 ["-gen-subtarget"],2939 "lib/Target/PowerPC/PPCGenSubtargetInfo.inc",2940 ),2941 (2942 ["-gen-disassembler"],2943 "lib/Target/PowerPC/PPCGenDisassemblerTables.inc",2944 ),2945 (2946 ["-gen-register-bank"],2947 "lib/Target/PowerPC/PPCGenRegisterBank.inc",2948 ),2949 (2950 ["-gen-global-isel"],2951 "lib/Target/PowerPC/PPCGenGlobalISel.inc",2952 ),2953 (2954 ["-gen-exegesis"],2955 "lib/Target/PowerPC/PPCGenExegesis.inc",2956 ),2957 (2958 ["-gen-sd-node-info"],2959 "lib/Target/PowerPC/PPCGenSDNodeInfo.inc",2960 ),2961 ],2962 },2963 {2964 "name": "RISCV",2965 "short_name": "RISCV",2966 "tbl_outs": [2967 (2968 ["-gen-asm-matcher"],2969 "lib/Target/RISCV/RISCVGenAsmMatcher.inc",2970 ),2971 (2972 ["-gen-asm-writer"],2973 "lib/Target/RISCV/RISCVGenAsmWriter.inc",2974 ),2975 (2976 ["-gen-compress-inst-emitter"],2977 "lib/Target/RISCV/RISCVGenCompressInstEmitter.inc",2978 ),2979 (2980 ["-gen-dag-isel"],2981 "lib/Target/RISCV/RISCVGenDAGISel.inc",2982 ),2983 (2984 [2985 "-gen-disassembler",2986 "--specialize-decoders-per-bitwidth",2987 ],2988 "lib/Target/RISCV/RISCVGenDisassemblerTables.inc",2989 ),2990 (2991 ["-gen-instr-info"],2992 "lib/Target/RISCV/RISCVGenInstrInfo.inc",2993 ),2994 (2995 ["-gen-macro-fusion-pred"],2996 "lib/Target/RISCV/RISCVGenMacroFusion.inc",2997 ),2998 (2999 ["-gen-emitter"],3000 "lib/Target/RISCV/RISCVGenMCCodeEmitter.inc",3001 ),3002 (3003 ["-gen-pseudo-lowering"],3004 "lib/Target/RISCV/RISCVGenMCPseudoLowering.inc",3005 ),3006 (3007 ["-gen-register-bank"],3008 "lib/Target/RISCV/RISCVGenRegisterBank.inc",3009 ),3010 (3011 ["-gen-register-info"],3012 [3013 "lib/Target/RISCV/RISCVGenRegisterInfo.inc",3014 "lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc",3015 "lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc",3016 "lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc",3017 "lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc",3018 ],3019 ),3020 (3021 ["-gen-subtarget"],3022 "lib/Target/RISCV/RISCVGenSubtargetInfo.inc",3023 ),3024 (3025 ["-gen-searchable-tables"],3026 "lib/Target/RISCV/RISCVGenSearchableTables.inc",3027 ),3028 (3029 ["-gen-exegesis"],3030 "lib/Target/RISCV/RISCVGenExegesis.inc",3031 ),3032 (3033 ["-gen-sd-node-info"],3034 "lib/Target/RISCV/RISCVGenSDNodeInfo.inc",3035 ),3036 ],3037 "tbl_deps": [3038 ":riscv_isel_target_gen",3039 ],3040 },3041 {3042 "name": "Sparc",3043 "short_name": "Sparc",3044 "tbl_outs": [3045 (3046 ["-gen-asm-writer"],3047 "lib/Target/Sparc/SparcGenAsmWriter.inc",3048 ),3049 (3050 ["-gen-asm-matcher"],3051 "lib/Target/Sparc/SparcGenAsmMatcher.inc",3052 ),3053 (3054 ["-gen-emitter"],3055 "lib/Target/Sparc/SparcGenMCCodeEmitter.inc",3056 ),3057 (3058 ["-gen-register-info"],3059 [3060 "lib/Target/Sparc/SparcGenRegisterInfo.inc",3061 "lib/Target/Sparc/SparcGenRegisterInfoEnums.inc",3062 "lib/Target/Sparc/SparcGenRegisterInfoMCDesc.inc",3063 "lib/Target/Sparc/SparcGenRegisterInfoHeader.inc",3064 "lib/Target/Sparc/SparcGenRegisterInfoTargetDesc.inc",3065 ],3066 ),3067 (3068 ["-gen-instr-info"],3069 "lib/Target/Sparc/SparcGenInstrInfo.inc",3070 ),3071 (3072 ["-gen-dag-isel"],3073 "lib/Target/Sparc/SparcGenDAGISel.inc",3074 ),3075 (3076 ["-gen-callingconv"],3077 "lib/Target/Sparc/SparcGenCallingConv.inc",3078 ),3079 (3080 ["-gen-subtarget"],3081 "lib/Target/Sparc/SparcGenSubtargetInfo.inc",3082 ),3083 (3084 ["-gen-disassembler"],3085 "lib/Target/Sparc/SparcGenDisassemblerTables.inc",3086 ),3087 (3088 ["-gen-searchable-tables"],3089 "lib/Target/Sparc/SparcGenSearchableTables.inc",3090 ),3091 (3092 [3093 "-gen-sd-node-info",3094 "-sdnode-namespace=SPISD",3095 ],3096 "lib/Target/Sparc/SparcGenSDNodeInfo.inc",3097 ),3098 ],3099 },3100 {3101 "name": "SPIRV",3102 "short_name": "SPIRV",3103 "tbl_outs": [3104 (3105 ["-gen-asm-writer"],3106 "lib/Target/SPIRV/SPIRVGenAsmWriter.inc",3107 ),3108 (3109 ["-gen-emitter"],3110 "lib/Target/SPIRV/SPIRVGenMCCodeEmitter.inc",3111 ),3112 (3113 ["-gen-global-isel"],3114 "lib/Target/SPIRV/SPIRVGenGlobalISel.inc",3115 ),3116 (3117 [3118 "-gen-global-isel-combiner",3119 "-combiners=SPIRVPreLegalizerCombiner",3120 ],3121 "lib/Target/SPIRV/SPIRVGenPreLegalizeGICombiner.inc",3122 ),3123 (3124 ["-gen-instr-info"],3125 "lib/Target/SPIRV/SPIRVGenInstrInfo.inc",3126 ),3127 (3128 ["-gen-register-bank"],3129 "lib/Target/SPIRV/SPIRVGenRegisterBank.inc",3130 ),3131 (3132 ["-gen-register-info"],3133 [3134 "lib/Target/SPIRV/SPIRVGenRegisterInfo.inc",3135 "lib/Target/SPIRV/SPIRVGenRegisterInfoEnums.inc",3136 "lib/Target/SPIRV/SPIRVGenRegisterInfoMCDesc.inc",3137 "lib/Target/SPIRV/SPIRVGenRegisterInfoHeader.inc",3138 "lib/Target/SPIRV/SPIRVGenRegisterInfoTargetDesc.inc",3139 ],3140 ),3141 (3142 ["-gen-searchable-tables"],3143 "lib/Target/SPIRV/SPIRVGenTables.inc",3144 ),3145 (3146 ["-gen-subtarget"],3147 "lib/Target/SPIRV/SPIRVGenSubtargetInfo.inc",3148 ),3149 ],3150 },3151 {3152 "name": "SystemZ",3153 "short_name": "SystemZ",3154 "tbl_outs": [3155 (3156 ["-gen-asm-matcher"],3157 "lib/Target/SystemZ/SystemZGenAsmMatcher.inc",3158 ),3159 (3160 ["-gen-asm-writer"],3161 "lib/Target/SystemZ/SystemZGenGNUAsmWriter.inc",3162 ),3163 (3164 [3165 "-gen-asm-writer",3166 "-asmwriternum=1",3167 ],3168 "lib/Target/SystemZ/SystemZGenHLASMAsmWriter.inc",3169 ),3170 (3171 ["-gen-callingconv"],3172 "lib/Target/SystemZ/SystemZGenCallingConv.inc",3173 ),3174 (3175 ["-gen-dag-isel"],3176 "lib/Target/SystemZ/SystemZGenDAGISel.inc",3177 ),3178 (3179 ["-gen-disassembler"],3180 "lib/Target/SystemZ/SystemZGenDisassemblerTables.inc",3181 ),3182 (3183 ["-gen-emitter"],3184 "lib/Target/SystemZ/SystemZGenMCCodeEmitter.inc",3185 ),3186 (3187 ["-gen-instr-info"],3188 "lib/Target/SystemZ/SystemZGenInstrInfo.inc",3189 ),3190 (3191 ["-gen-register-info"],3192 [3193 "lib/Target/SystemZ/SystemZGenRegisterInfo.inc",3194 "lib/Target/SystemZ/SystemZGenRegisterInfoEnums.inc",3195 "lib/Target/SystemZ/SystemZGenRegisterInfoMCDesc.inc",3196 "lib/Target/SystemZ/SystemZGenRegisterInfoHeader.inc",3197 "lib/Target/SystemZ/SystemZGenRegisterInfoTargetDesc.inc",3198 ],3199 ),3200 (3201 ["-gen-subtarget"],3202 "lib/Target/SystemZ/SystemZGenSubtargetInfo.inc",3203 ),3204 (3205 ["-gen-sd-node-info"],3206 "lib/Target/SystemZ/SystemZGenSDNodeInfo.inc",3207 ),3208 ],3209 },3210 {3211 "name": "VE",3212 "short_name": "VE",3213 "tbl_outs": [3214 (3215 ["-gen-asm-matcher"],3216 "lib/Target/VE/VEGenAsmMatcher.inc",3217 ),3218 (3219 ["-gen-asm-writer"],3220 "lib/Target/VE/VEGenAsmWriter.inc",3221 ),3222 (3223 ["-gen-callingconv"],3224 "lib/Target/VE/VEGenCallingConv.inc",3225 ),3226 (3227 ["-gen-dag-isel"],3228 "lib/Target/VE/VEGenDAGISel.inc",3229 ),3230 (3231 ["-gen-disassembler"],3232 "lib/Target/VE/VEGenDisassemblerTables.inc",3233 ),3234 (3235 ["-gen-emitter"],3236 "lib/Target/VE/VEGenMCCodeEmitter.inc",3237 ),3238 (3239 ["-gen-instr-info"],3240 "lib/Target/VE/VEGenInstrInfo.inc",3241 ),3242 (3243 ["-gen-register-info"],3244 [3245 "lib/Target/VE/VEGenRegisterInfo.inc",3246 "lib/Target/VE/VEGenRegisterInfoEnums.inc",3247 "lib/Target/VE/VEGenRegisterInfoMCDesc.inc",3248 "lib/Target/VE/VEGenRegisterInfoHeader.inc",3249 "lib/Target/VE/VEGenRegisterInfoTargetDesc.inc",3250 ],3251 ),3252 (3253 ["-gen-subtarget"],3254 "lib/Target/VE/VEGenSubtargetInfo.inc",3255 ),3256 (3257 ["-gen-sd-node-info"],3258 "lib/Target/VE/VEGenSDNodeInfo.inc",3259 ),3260 ],3261 },3262 {3263 "name": "WebAssembly",3264 "short_name": "WebAssembly",3265 "tbl_outs": [3266 (3267 ["-gen-disassembler"],3268 "lib/Target/WebAssembly/WebAssemblyGenDisassemblerTables.inc",3269 ),3270 (3271 ["-gen-asm-writer"],3272 "lib/Target/WebAssembly/WebAssemblyGenAsmWriter.inc",3273 ),3274 (3275 ["-gen-instr-info"],3276 "lib/Target/WebAssembly/WebAssemblyGenInstrInfo.inc",3277 ),3278 (3279 ["-gen-dag-isel"],3280 "lib/Target/WebAssembly/WebAssemblyGenDAGISel.inc",3281 ),3282 (3283 ["-gen-fast-isel"],3284 "lib/Target/WebAssembly/WebAssemblyGenFastISel.inc",3285 ),3286 (3287 ["-gen-emitter"],3288 "lib/Target/WebAssembly/WebAssemblyGenMCCodeEmitter.inc",3289 ),3290 (3291 ["-gen-register-info"],3292 [3293 "lib/Target/WebAssembly/WebAssemblyGenRegisterInfo.inc",3294 "lib/Target/WebAssembly/WebAssemblyGenRegisterInfoEnums.inc",3295 "lib/Target/WebAssembly/WebAssemblyGenRegisterInfoMCDesc.inc",3296 "lib/Target/WebAssembly/WebAssemblyGenRegisterInfoHeader.inc",3297 "lib/Target/WebAssembly/WebAssemblyGenRegisterInfoTargetDesc.inc",3298 ],3299 ),3300 (3301 ["-gen-subtarget"],3302 "lib/Target/WebAssembly/WebAssemblyGenSubtargetInfo.inc",3303 ),3304 (3305 ["-gen-asm-matcher"],3306 "lib/Target/WebAssembly/WebAssemblyGenAsmMatcher.inc",3307 ),3308 (3309 ["-gen-sd-node-info"],3310 "lib/Target/WebAssembly/WebAssemblyGenSDNodeInfo.inc",3311 ),3312 ],3313 },3314 {3315 "name": "X86",3316 "short_name": "X86",3317 "tbl_outs": [3318 (3319 ["-gen-register-bank"],3320 "lib/Target/X86/X86GenRegisterBank.inc",3321 ),3322 (3323 ["-gen-register-info"],3324 [3325 "lib/Target/X86/X86GenRegisterInfo.inc",3326 "lib/Target/X86/X86GenRegisterInfoEnums.inc",3327 "lib/Target/X86/X86GenRegisterInfoMCDesc.inc",3328 "lib/Target/X86/X86GenRegisterInfoHeader.inc",3329 "lib/Target/X86/X86GenRegisterInfoTargetDesc.inc",3330 ],3331 ),3332 (3333 ["-gen-disassembler"],3334 "lib/Target/X86/X86GenDisassemblerTables.inc",3335 ),3336 (3337 ["-gen-instr-info"],3338 "lib/Target/X86/X86GenInstrInfo.inc",3339 ),3340 (3341 ["-gen-asm-writer"],3342 "lib/Target/X86/X86GenAsmWriter.inc",3343 ),3344 (3345 [3346 "-gen-asm-writer",3347 "-asmwriternum=1",3348 ],3349 "lib/Target/X86/X86GenAsmWriter1.inc",3350 ),3351 (3352 ["-gen-asm-matcher"],3353 "lib/Target/X86/X86GenAsmMatcher.inc",3354 ),3355 (3356 ["-gen-dag-isel"],3357 "lib/Target/X86/X86GenDAGISel.inc",3358 ),3359 (3360 ["-gen-fast-isel"],3361 "lib/Target/X86/X86GenFastISel.inc",3362 ),3363 (3364 ["-gen-global-isel"],3365 "lib/Target/X86/X86GenGlobalISel.inc",3366 ),3367 (3368 ["-gen-callingconv"],3369 "lib/Target/X86/X86GenCallingConv.inc",3370 ),3371 (3372 ["-gen-subtarget"],3373 "lib/Target/X86/X86GenSubtargetInfo.inc",3374 ),3375 (3376 [3377 "-gen-x86-fold-tables",3378 "-asmwriternum=1",3379 ],3380 "lib/Target/X86/X86GenFoldTables.inc",3381 ),3382 (3383 ["-gen-x86-instr-mapping"],3384 "lib/Target/X86/X86GenInstrMapping.inc",3385 ),3386 (3387 ["-gen-exegesis"],3388 "lib/Target/X86/X86GenExegesis.inc",3389 ),3390 (3391 [3392 "-gen-x86-mnemonic-tables",3393 "-asmwriternum=1",3394 ],3395 "lib/Target/X86/X86GenMnemonicTables.inc",3396 ),3397 ],3398 },3399 {3400 "name": "XCore",3401 "short_name": "XCore",3402 "tbl_outs": [3403 (3404 ["-gen-asm-writer"],3405 "lib/Target/XCore/XCoreGenAsmWriter.inc",3406 ),3407 (3408 ["-gen-callingconv"],3409 "lib/Target/XCore/XCoreGenCallingConv.inc",3410 ),3411 (3412 ["-gen-dag-isel"],3413 "lib/Target/XCore/XCoreGenDAGISel.inc",3414 ),3415 (3416 ["-gen-disassembler"],3417 "lib/Target/XCore/XCoreGenDisassemblerTables.inc",3418 ),3419 (3420 ["-gen-instr-info"],3421 "lib/Target/XCore/XCoreGenInstrInfo.inc",3422 ),3423 (3424 ["-gen-register-info"],3425 [3426 "lib/Target/XCore/XCoreGenRegisterInfo.inc",3427 "lib/Target/XCore/XCoreGenRegisterInfoEnums.inc",3428 "lib/Target/XCore/XCoreGenRegisterInfoMCDesc.inc",3429 "lib/Target/XCore/XCoreGenRegisterInfoHeader.inc",3430 "lib/Target/XCore/XCoreGenRegisterInfoTargetDesc.inc",3431 ],3432 ),3433 (3434 ["-gen-sd-node-info"],3435 "lib/Target/XCore/XCoreGenSDNodeInfo.inc",3436 ),3437 (3438 ["-gen-subtarget"],3439 "lib/Target/XCore/XCoreGenSubtargetInfo.inc",3440 ),3441 ],3442 },3443] if lib["name"] in llvm_targets]3444 3445cc_library(3446 name = "x86_target_layering_problem_hdrs",3447 textual_hdrs = ["lib/Target/X86/X86InstrInfo.h"],3448)3449 3450gentbl_cc_library(3451 name = "amdgpu_isel_target_gen",3452 strip_include_prefix = "lib/Target/AMDGPU",3453 tbl_outs = {3454 "lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc": ["-gen-global-isel"],3455 "lib/Target/AMDGPU/AMDGPUGenPreLegalizeGICombiner.inc": [3456 "-gen-global-isel-combiner",3457 "-combiners=AMDGPUPreLegalizerCombiner",3458 ],3459 "lib/Target/AMDGPU/AMDGPUGenPostLegalizeGICombiner.inc": [3460 "-gen-global-isel-combiner",3461 "-combiners=AMDGPUPostLegalizerCombiner",3462 ],3463 "lib/Target/AMDGPU/AMDGPUGenRegBankGICombiner.inc": [3464 "-gen-global-isel-combiner",3465 "-combiners=AMDGPURegBankCombiner",3466 ],3467 },3468 tblgen = ":llvm-tblgen",3469 td_file = "lib/Target/AMDGPU/AMDGPUGISel.td",3470 deps = [3471 ":AMDGPUTargetTdFiles",3472 ":CommonTargetTdFiles",3473 ],3474)3475 3476gentbl_cc_library(3477 name = "r600_target_gen",3478 strip_include_prefix = "lib/Target/AMDGPU",3479 tbl_outs = [3480 (3481 ["-gen-asm-writer"],3482 "lib/Target/AMDGPU/R600GenAsmWriter.inc",3483 ),3484 (3485 ["-gen-callingconv"],3486 "lib/Target/AMDGPU/R600GenCallingConv.inc",3487 ),3488 (3489 ["-gen-dag-isel"],3490 "lib/Target/AMDGPU/R600GenDAGISel.inc",3491 ),3492 (3493 ["-gen-dfa-packetizer"],3494 "lib/Target/AMDGPU/R600GenDFAPacketizer.inc",3495 ),3496 (3497 ["-gen-instr-info"],3498 "lib/Target/AMDGPU/R600GenInstrInfo.inc",3499 ),3500 (3501 ["-gen-emitter"],3502 "lib/Target/AMDGPU/R600GenMCCodeEmitter.inc",3503 ),3504 (3505 ["-gen-register-info"],3506 [3507 "lib/Target/AMDGPU/R600GenRegisterInfo.inc",3508 "lib/Target/AMDGPU/R600GenRegisterInfoEnums.inc",3509 "lib/Target/AMDGPU/R600GenRegisterInfoMCDesc.inc",3510 "lib/Target/AMDGPU/R600GenRegisterInfoHeader.inc",3511 "lib/Target/AMDGPU/R600GenRegisterInfoTargetDesc.inc",3512 ],3513 ),3514 (3515 ["-gen-subtarget"],3516 "lib/Target/AMDGPU/R600GenSubtargetInfo.inc",3517 ),3518 ],3519 tblgen = ":llvm-tblgen",3520 td_file = "lib/Target/AMDGPU/R600.td",3521 deps = [3522 ":AMDGPUTargetTdFiles",3523 ":CommonTargetTdFiles",3524 ],3525)3526 3527gentbl_cc_library(3528 name = "riscv_isel_target_gen",3529 strip_include_prefix = "lib/Target/RISCV",3530 tbl_outs = {3531 "lib/Target/RISCV/RISCVGenGlobalISel.inc": ["-gen-global-isel"],3532 "lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc": [3533 "-gen-global-isel-combiner",3534 "-combiners=RISCVO0PreLegalizerCombiner",3535 ],3536 "lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc": [3537 "-gen-global-isel-combiner",3538 "-combiners=RISCVPostLegalizerCombiner",3539 ],3540 "lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc": [3541 "-gen-global-isel-combiner",3542 "-combiners=RISCVPreLegalizerCombiner",3543 ],3544 },3545 tblgen = ":llvm-tblgen",3546 td_file = "lib/Target/RISCV/RISCVGISel.td",3547 deps = [3548 ":CommonTargetTdFiles",3549 ":RISCVTargetTdFiles",3550 ],3551)3552 3553[[3554 [gentbl_cc_library(3555 name = target["name"] + "CommonTableGen",3556 strip_include_prefix = "lib/Target/" + target["name"],3557 # MSVC isn't happy with long string literals, while other compilers3558 # which support them get significant compile time improvements with3559 # them enabled. Ideally this flag would only be enabled on Windows via3560 # a select() on `@platforms//os:windows,`, but that would3561 # require refactoring gentbl from a macro into a rule.3562 # TODO(#92): Refactor gentbl to support this use3563 tbl_outs = target["tbl_outs"],3564 tblgen = ":llvm-tblgen",3565 td_file = "lib/Target/" + target["name"] + "/" + target["short_name"] + ".td",3566 td_srcs = glob(3567 [3568 "lib/Target/" + target["name"] + "/*.td",3569 "lib/Target/" + target["name"] + "/GISel/*.td",3570 ],3571 allow_empty = True,3572 ),3573 deps = target.get("tbl_deps", []) + [":CommonTargetTdFiles"],3574 )],3575 [cc_library(3576 name = target["name"] + "Info",3577 srcs = ["lib/Target/" + target["name"] + "/TargetInfo/" + target["name"] + "TargetInfo.cpp"],3578 hdrs = glob(["lib/Target/" + target["name"] + "/TargetInfo/*.h"]),3579 copts = llvm_copts,3580 # Workaround for https://github.com/bazelbuild/bazel/issues/38283581 # TODO(gcmn): Remove this when upgrading to a Bazel version containing3582 # https://github.com/bazelbuild/bazel/commit/e3b7e17b05f13583 includes = ["lib/Target/" + target["name"]],3584 strip_include_prefix = "lib/Target/" + target["name"],3585 deps = [3586 ":" + target["name"] + "CommonTableGen",3587 ":MC",3588 ":Support",3589 ":Target",3590 ],3591 )],3592 # We cannot separate the `Utils` and `MCTargetDesc` sublibraries of3593 # a number of targets due to crisscrossing inclusion of headers.3594 [cc_library(3595 name = target["name"] + "UtilsAndDesc",3596 srcs = glob(3597 [3598 "lib/Target/" + target["name"] + "/MCTargetDesc/*.cpp",3599 "lib/Target/" + target["name"] + "/Utils/*.cpp",3600 3601 # We have to include these headers here as well as in the `hdrs`3602 # below to allow the `.cpp` files to use file-relative-inclusion to3603 # find them, even though consumers of this library use inclusion3604 # relative to the target with the `strip_includes_prefix` of this3605 # library. This mixture is likely incompatible with header modules.3606 "lib/Target/" + target["name"] + "/MCTargetDesc/*.h",3607 "lib/Target/" + target["name"] + "/Utils/*.h",3608 ],3609 allow_empty = True,3610 ),3611 hdrs = glob(3612 [3613 "lib/Target/" + target["name"] + "/MCTargetDesc/*.h",3614 "lib/Target/" + target["name"] + "/Utils/*.h",3615 3616 # This a bit of a hack to allow us to expose common, internal3617 # target header files to other libraries within the target via3618 # target-relative includes. This usage of headers is inherently3619 # non-modular as there is a mixture of target-relative inclusion3620 # using this rule and file-relative inclusion using the repeated3621 # listing of these headers in the `srcs` of subsequent rules.3622 "lib/Target/" + target["name"] + "/*.h",3623 3624 # FIXME: The entries below should be `textual_hdrs` instead of3625 # `hdrs`, but unfortunately that doesn't work with3626 # `strip_include_prefix`:3627 # https://github.com/bazelbuild/bazel/issues/124243628 #3629 # Once that issue is fixed and released, we can switch this to3630 # `textual_hdrs` and remove the feature disabling the various Bazel3631 # features (both current and under-development) that motivated the3632 # distinction between these two.3633 "lib/Target/" + target["name"] + "/*.def",3634 "lib/Target/" + target["name"] + "/*.inc",3635 "lib/Target/" + target["name"] + "/MCTargetDesc/*.def",3636 ],3637 allow_empty = True,3638 ),3639 copts = llvm_copts,3640 features = [3641 "-parse_headers",3642 "-header_modules",3643 "-layering_check",3644 ],3645 strip_include_prefix = "lib/Target/" + target["name"],3646 deps = [3647 ":BinaryFormat",3648 ":CodeGen",3649 ":CodeGenTypes",3650 ":Core",3651 ":DebugInfoCodeView",3652 ":MC",3653 ":MCDisassembler",3654 ":Support",3655 ":Target",3656 ":config",3657 ":" + target["name"] + "CommonTableGen",3658 ":" + target["name"] + "Info",3659 ] + target.get("tbl_deps", []),3660 )],3661 [cc_library(3662 name = target["name"] + "CodeGen",3663 srcs = glob(3664 [3665 "lib/Target/" + target["name"] + "/Analysis/*.cpp",3666 "lib/Target/" + target["name"] + "/Analysis/*.h",3667 "lib/Target/" + target["name"] + "/GISel/*.cpp",3668 "lib/Target/" + target["name"] + "/GISel/*.h",3669 "lib/Target/" + target["name"] + "/*.cpp",3670 "lib/Target/" + target["name"] + "/*.h",3671 ],3672 allow_empty = True,3673 ),3674 hdrs = ["lib/Target/" + target["name"] + "/" + target["short_name"] + ".h"],3675 copts = llvm_copts,3676 features = ["-layering_check"],3677 strip_include_prefix = "lib/Target/" + target["name"],3678 textual_hdrs = glob(3679 [3680 "lib/Target/" + target["name"] + "/*.def",3681 "lib/Target/" + target["name"] + "/*.inc",3682 ],3683 allow_empty = True,3684 ),3685 deps = [3686 ":Analysis",3687 ":BinaryFormat",3688 ":CFGuard",3689 ":CodeGen",3690 ":CodeGenTypes",3691 ":Core",3692 ":IPO",3693 ":MC",3694 ":Passes", # TODO(chandlerc): Likely a layering violation.3695 ":ProfileData",3696 ":Scalar",3697 ":Support",3698 ":Target",3699 ":TransformUtils",3700 ":Vectorize",3701 ":config",3702 ":" + target["name"] + "CommonTableGen",3703 ":" + target["name"] + "Info",3704 ":" + target["name"] + "UtilsAndDesc",3705 ] + target.get("tbl_deps", []),3706 )],3707 [cc_library(3708 name = target["name"] + "AsmParser",3709 srcs = glob(3710 [3711 "lib/Target/" + target["name"] + "/AsmParser/*.cpp",3712 "lib/Target/" + target["name"] + "/AsmParser/*.h",3713 ],3714 allow_empty = True,3715 ),3716 copts = llvm_copts,3717 deps = [3718 ":BinaryFormat",3719 ":CodeGenTypes",3720 ":MC",3721 ":MCParser",3722 ":Support",3723 ":Target",3724 ":TargetParser",3725 ":" + target["name"] + "CodeGen",3726 ":" + target["name"] + "CommonTableGen",3727 ":" + target["name"] + "Info",3728 ":" + target["name"] + "UtilsAndDesc",3729 ],3730 )],3731 # This target is a bit of a hack to allow us to expose internal3732 # disassembler header files via internal target-relative include paths.3733 # This usage of headers is inherently non-modular as there is a mixture of3734 # target-relative inclusion using this rule and same-directory inclusion3735 # using the repeated listing of these headers in the `srcs` below.3736 [cc_library(3737 name = target["name"] + "DisassemblerInternalHeaders",3738 # FIXME: This should be `textual_hdrs` instead of `hdrs`, but3739 # unfortunately that doesn't work with `strip_include_prefix`:3740 # https://github.com/bazelbuild/bazel/issues/124243741 #3742 # Once that issue is fixed and released, we can switch this to3743 # `textual_hdrs` and remove the feature disabling the various Bazel3744 # features (both current and under-development) that motivated the3745 # distinction between these two.3746 hdrs = glob(3747 [3748 "lib/Target/" + target["name"] + "/Disassembler/*.h",3749 ],3750 allow_empty = True,3751 ),3752 features = [3753 "-parse_headers",3754 "-header_modules",3755 ],3756 strip_include_prefix = "lib/Target/" + target["name"],3757 )],3758 [cc_library(3759 name = target["name"] + "Disassembler",3760 srcs = glob(3761 [3762 "lib/Target/" + target["name"] + "/Disassembler/*.cpp",3763 "lib/Target/" + target["name"] + "/Disassembler/*.c",3764 "lib/Target/" + target["name"] + "/Disassembler/*.h",3765 ],3766 allow_empty = True,3767 ),3768 copts = llvm_copts,3769 features = ["-layering_check"],3770 deps = [3771 ":CodeGenTypes",3772 ":Core",3773 ":MC",3774 ":MCDisassembler",3775 ":Support",3776 ":Target",3777 ":" + target["name"] + "CodeGen",3778 ":" + target["name"] + "DisassemblerInternalHeaders",3779 ":" + target["name"] + "CommonTableGen",3780 ":" + target["name"] + "UtilsAndDesc",3781 ],3782 )],3783 [cc_library(3784 name = target["name"] + "TargetMCA",3785 srcs = glob(3786 [3787 "lib/Target/" + target["name"] + "/MCA/*.cpp",3788 "lib/Target/" + target["name"] + "/MCA/*.c",3789 "lib/Target/" + target["name"] + "/MCA/*.h",3790 ],3791 allow_empty = True,3792 ),3793 copts = llvm_copts,3794 features = ["-layering_check"],3795 deps = [3796 ":CodeGenTypes",3797 ":MC",3798 ":MCA",3799 ":MCParser",3800 ":Support",3801 ":" + target["name"] + "DisassemblerInternalHeaders",3802 ":" + target["name"] + "Info",3803 ":" + target["name"] + "UtilsAndDesc",3804 ],3805 )],3806] for target in llvm_target_lib_list]3807 3808cc_library(3809 name = "AllTargetsCodeGens",3810 copts = llvm_copts,3811 deps = [3812 target["name"] + "CodeGen"3813 for target in llvm_target_lib_list3814 ],3815)3816 3817cc_library(3818 name = "AllTargetsAsmParsers",3819 copts = llvm_copts,3820 deps = [3821 target["name"] + "AsmParser"3822 for target in llvm_target_lib_list3823 ],3824)3825 3826cc_library(3827 name = "AllTargetsDisassemblers",3828 copts = llvm_copts,3829 deps = [3830 target["name"] + "Disassembler"3831 for target in llvm_target_lib_list3832 ],3833)3834 3835cc_library(3836 name = "AllTargetsMCAs",3837 copts = llvm_copts,3838 deps = [3839 target["name"] + "TargetMCA"3840 for target in llvm_target_lib_list3841 ],3842)3843 3844cc_library(3845 name = "pass_registry_def",3846 copts = llvm_copts,3847 textual_hdrs = ["lib/Passes/PassRegistry.def"],3848)3849 3850cc_library(3851 name = "Passes",3852 srcs = glob([3853 "lib/Passes/*.cpp",3854 ]),3855 hdrs = glob([3856 "include/llvm/Passes/*.h",3857 "include/llvm/Passes/*.def",3858 "include/llvm/Passes/*.inc",3859 ]) + ["include/llvm-c/Transforms/PassBuilder.h"],3860 copts = llvm_copts,3861 deps = [3862 ":AggressiveInstCombine",3863 ":Analysis",3864 ":CFGuard",3865 ":CodeGen",3866 ":Core",3867 ":Coroutines",3868 ":HipStdPar",3869 ":IPO",3870 ":IRPrinter",3871 ":InstCombine",3872 ":Instrumentation",3873 ":MC",3874 ":ObjCARC",3875 ":Scalar",3876 ":Support",3877 ":Target",3878 ":TransformUtils",3879 ":Vectorize",3880 ":common_transforms",3881 ":config",3882 ":pass_registry_def",3883 ],3884)3885 3886cc_library(3887 name = "LTO",3888 srcs = glob([3889 "lib/LTO/*.cpp",3890 ]),3891 hdrs = glob([3892 "include/llvm/LTO/*.h",3893 "include/llvm/LTO/legacy/*.h",3894 ]) + [3895 "include/llvm-c/lto.h",3896 ],3897 copts = llvm_copts,3898 deps = [3899 ":Analysis",3900 ":BitReader",3901 ":BitWriter",3902 ":CGData",3903 ":CodeGen",3904 ":CodeGenTypes",3905 ":Core",3906 ":IPO",3907 ":IRPrinter",3908 ":IRReader",3909 ":Linker",3910 ":MC",3911 ":MCParser",3912 ":ObjCARC",3913 ":Object",3914 ":Passes",3915 ":Remarks",3916 ":Scalar",3917 ":Support",3918 ":Target",3919 ":TargetParser",3920 ":TransformUtils",3921 ":common_transforms",3922 ":config",3923 ],3924)3925 3926cc_library(3927 name = "ExecutionEngine",3928 srcs = glob([3929 "lib/ExecutionEngine/*.cpp",3930 "lib/ExecutionEngine/RuntimeDyld/*.cpp",3931 "lib/ExecutionEngine/RuntimeDyld/*.h",3932 "lib/ExecutionEngine/RuntimeDyld/Targets/*.cpp",3933 "lib/ExecutionEngine/RuntimeDyld/Targets/*.h",3934 ]),3935 hdrs = glob(3936 [3937 "include/llvm/ExecutionEngine/*.h",3938 ],3939 exclude = [3940 "include/llvm/ExecutionEngine/MCJIT*.h",3941 "include/llvm/ExecutionEngine/OProfileWrapper.h",3942 ],3943 ) + [3944 "include/llvm-c/ExecutionEngine.h",3945 ],3946 copts = llvm_copts,3947 deps = [3948 ":BinaryFormat",3949 ":CodeGen",3950 ":Core",3951 ":DebugInfo",3952 ":MC",3953 ":MCDisassembler",3954 ":Object",3955 ":OrcShared",3956 ":OrcTargetProcess",3957 ":Passes",3958 ":Support",3959 ":Target",3960 ":TargetParser",3961 ":config",3962 ],3963)3964 3965cc_library(3966 name = "Interpreter",3967 srcs = glob([3968 "lib/ExecutionEngine/Interpreter/*.cpp",3969 "lib/ExecutionEngine/Interpreter/*.h",3970 ]),3971 hdrs = ["include/llvm/ExecutionEngine/Interpreter.h"],3972 copts = llvm_copts,3973 deps = [3974 ":CodeGen",3975 ":Core",3976 ":ExecutionEngine",3977 ":Support",3978 ":Target",3979 ":config",3980 ],3981)3982 3983gentbl_cc_library(3984 name = "JITLinkTableGen",3985 strip_include_prefix = "lib/ExecutionEngine/JITLink",3986 tbl_outs = {"lib/ExecutionEngine/JITLink/COFFOptions.inc": ["-gen-opt-parser-defs"]},3987 tblgen = ":llvm-tblgen",3988 td_file = "lib/ExecutionEngine/JITLink/COFFOptions.td",3989 deps = [":OptParserTdFiles"],3990)3991 3992cc_library(3993 name = "JITLink",3994 srcs = glob([3995 "lib/ExecutionEngine/JITLink/*.cpp",3996 "lib/ExecutionEngine/JITLink/*.h",3997 ]),3998 hdrs = glob([3999 "include/llvm/ExecutionEngine/JITLink/*.h",4000 "include/llvm/ExecutionEngine/Orc/*.h",4001 ]),4002 copts = llvm_copts,4003 deps = [4004 ":BinaryFormat",4005 ":ExecutionEngine",4006 ":JITLinkTableGen",4007 ":Object",4008 ":Option",4009 ":OrcShared",4010 ":OrcTargetProcess",4011 ":Support",4012 ":TargetParser",4013 ":config",4014 ],4015)4016 4017cc_library(4018 name = "MCJIT",4019 srcs = glob([4020 "lib/ExecutionEngine/MCJIT/*.cpp",4021 "lib/ExecutionEngine/MCJIT/*.h",4022 ]),4023 hdrs = glob(["include/llvm/ExecutionEngine/MCJIT*.h"]),4024 copts = llvm_copts,4025 deps = [4026 ":CodeGen",4027 ":Core",4028 ":ExecutionEngine",4029 ":MC",4030 ":Object",4031 ":Support",4032 ":Target",4033 ":config",4034 ],4035)4036 4037cc_library(4038 name = "OrcJIT",4039 srcs = glob([4040 "lib/ExecutionEngine/Orc/*.cpp",4041 ]),4042 hdrs = glob([4043 "include/llvm/ExecutionEngine/Orc/*.h",4044 ]) + [4045 "include/llvm-c/LLJIT.h",4046 "include/llvm-c/Orc.h",4047 "include/llvm-c/OrcEE.h",4048 ],4049 copts = llvm_copts,4050 linkopts = select({4051 "@platforms//os:android": [],4052 "@platforms//os:windows": [],4053 "@platforms//os:freebsd": [],4054 "@platforms//os:macos": [],4055 "//conditions:default": [4056 "-lrt",4057 ],4058 }),4059 deps = [4060 ":Analysis",4061 ":BinaryFormat",4062 ":BitReader",4063 ":BitWriter",4064 ":Core",4065 ":DebugInfoDWARF",4066 ":ExecutionEngine",4067 ":JITLink",4068 ":MC",4069 ":MCDisassembler",4070 ":Object",4071 ":OrcShared",4072 ":OrcTargetProcess",4073 ":Passes",4074 ":Support",4075 ":Target",4076 ":TargetParser",4077 ":TransformUtils",4078 ":WindowsDriver",4079 ":config",4080 ],4081)4082 4083cc_library(4084 name = "OrcShared",4085 srcs = glob([4086 "lib/ExecutionEngine/Orc/Shared/*.cpp",4087 ]),4088 hdrs = glob([4089 "include/llvm/ExecutionEngine/Orc/Shared/*.h",4090 ] + [4091 "include/llvm/ExecutionEngine/Orc/SymbolStringPool.h",4092 ]),4093 copts = llvm_copts,4094 deps = [4095 ":BinaryFormat",4096 ":CodeGen",4097 ":Core",4098 ":DebugInfo",4099 ":MC",4100 ":MCDisassembler",4101 ":Object",4102 ":Passes",4103 ":Support",4104 ":Target",4105 ":config",4106 ],4107)4108 4109cc_library(4110 name = "OrcDebugging",4111 srcs = glob([4112 "lib/ExecutionEngine/Orc/Debugging/*.cpp",4113 ]),4114 hdrs = glob([4115 "include/llvm/ExecutionEngine/Orc/Debugging/*.h",4116 ]) + ["include/llvm-c/LLJITUtils.h"],4117 copts = llvm_copts,4118 deps = [4119 ":BinaryFormat",4120 ":Core",4121 ":DebugInfo",4122 ":DebugInfoDWARF",4123 ":JITLink",4124 ":Object",4125 ":OrcJIT",4126 ":OrcShared",4127 ":Support",4128 ":TargetParser",4129 ],4130)4131 4132cc_library(4133 name = "OrcTargetProcess",4134 srcs = glob([4135 "lib/ExecutionEngine/Orc/TargetProcess/*.cpp",4136 "lib/ExecutionEngine/Orc/TargetProcess/*.h",4137 ]),4138 hdrs = glob([4139 "include/llvm/ExecutionEngine/Orc/TargetProcess/*.h",4140 ]),4141 copts = llvm_copts,4142 linkopts = select({4143 "@platforms//os:android": [],4144 "@platforms//os:windows": [],4145 "@platforms//os:freebsd": [],4146 "@platforms//os:macos": [],4147 "//conditions:default": [4148 "-lrt",4149 ],4150 }),4151 deps = [4152 ":BinaryFormat",4153 ":CodeGen",4154 ":Core",4155 ":DebugInfo",4156 ":MC",4157 ":MCDisassembler",4158 ":Object",4159 ":OrcShared",4160 ":Passes",4161 ":Support",4162 ":Target",4163 ":TargetParser",4164 ":config",4165 ],4166)4167 4168cc_library(4169 name = "DWARFLinker",4170 srcs = glob([4171 "lib/DWARFLinker/Classic/*.cpp",4172 ]),4173 hdrs = glob(["include/llvm/DWARFLinker/Classic/*.h"]),4174 copts = llvm_copts,4175 deps = [4176 ":BinaryFormat",4177 ":CodeGen",4178 ":CodeGenTypes",4179 ":DWARFLinkerBase",4180 ":DebugInfoDWARF",4181 ":DebugInfoDWARFLowLevel",4182 ":MC",4183 ":Support",4184 ":Target",4185 ":TargetParser",4186 ],4187)4188 4189cc_library(4190 name = "DWARFLinkerBase",4191 srcs = glob([4192 "lib/DWARFLinker/*.cpp",4193 ]),4194 hdrs = glob(["include/llvm/DWARFLinker/*.h"]),4195 copts = llvm_copts,4196 deps = [4197 ":BinaryFormat",4198 ":CodeGen",4199 ":DebugInfoDWARF",4200 ":DebugInfoDWARFLowLevel",4201 ":Support",4202 ":Target",4203 ],4204)4205 4206cc_library(4207 name = "DWARFLinkerParallel",4208 srcs = glob([4209 "lib/DWARFLinker/Parallel/*.cpp",4210 "lib/DWARFLinker/Parallel/*.h",4211 ]),4212 hdrs = glob(["include/llvm/DWARFLinker/Parallel/*.h"]),4213 copts = llvm_copts,4214 deps = [4215 ":BinaryFormat",4216 ":CodeGen",4217 ":DWARFLinkerBase",4218 ":DebugInfoDWARF",4219 ":MC",4220 ":Object",4221 ":Support",4222 ":Target",4223 ":TargetParser",4224 ],4225)4226 4227gentbl_cc_library(4228 name = "DllOptionsTableGen",4229 strip_include_prefix = "lib/ToolDrivers/llvm-dlltool",4230 tbl_outs = {"lib/ToolDrivers/llvm-dlltool/Options.inc": ["-gen-opt-parser-defs"]},4231 tblgen = ":llvm-tblgen",4232 td_file = "lib/ToolDrivers/llvm-dlltool/Options.td",4233 deps = [":OptParserTdFiles"],4234)4235 4236cc_library(4237 name = "DlltoolDriver",4238 srcs = glob(["lib/ToolDrivers/llvm-dlltool/*.cpp"]),4239 hdrs = glob(["include/llvm/ToolDrivers/llvm-dlltool/*.h"]),4240 copts = llvm_copts,4241 deps = [4242 ":DllOptionsTableGen",4243 ":Object",4244 ":Option",4245 ":Support",4246 ":TargetParser",4247 ],4248)4249 4250gentbl_cc_library(4251 name = "LibOptionsTableGen",4252 strip_include_prefix = "lib/ToolDrivers/llvm-lib",4253 tbl_outs = [(4254 ["-gen-opt-parser-defs"],4255 "lib/ToolDrivers/llvm-lib/Options.inc",4256 )],4257 tblgen = ":llvm-tblgen",4258 td_file = "lib/ToolDrivers/llvm-lib/Options.td",4259 deps = [":OptParserTdFiles"],4260)4261 4262cc_library(4263 name = "LibDriver",4264 srcs = glob(["lib/ToolDrivers/llvm-lib/*.cpp"]),4265 hdrs = glob(["include/llvm/ToolDrivers/llvm-lib/*.h"]),4266 copts = llvm_copts,4267 deps = [4268 ":BinaryFormat",4269 ":BitReader",4270 ":LibOptionsTableGen",4271 ":Object",4272 ":Option",4273 ":Support",4274 ],4275)4276 4277cc_library(4278 name = "InterfaceStub",4279 srcs = glob([4280 "lib/InterfaceStub/*.cpp",4281 ]),4282 hdrs = glob([4283 "include/llvm/InterfaceStub/*.h",4284 ]),4285 copts = llvm_copts,4286 deps = [4287 ":BinaryFormat",4288 ":MC",4289 ":Object",4290 ":Support",4291 ":TargetParser",4292 ":config",4293 ],4294)4295 4296cc_library(4297 name = "WindowsDriver",4298 srcs = glob([4299 "lib/WindowsDriver/*.cpp",4300 ]),4301 hdrs = glob([4302 "include/llvm/WindowsDriver/*.h",4303 ]),4304 copts = llvm_copts,4305 deps = [4306 ":Option",4307 ":Support",4308 ":TargetParser",4309 ],4310)4311 4312cc_library(4313 name = "WindowsManifest",4314 srcs = glob([4315 "lib/WindowsManifest/*.cpp",4316 ]),4317 hdrs = glob([4318 "include/llvm/WindowsManifest/*.h",4319 ]),4320 copts = llvm_copts,4321 deps = [4322 ":Support",4323 ":config",4324 ],4325)4326 4327cc_library(4328 name = "MCA",4329 srcs = glob([4330 "lib/MCA/**/*.cpp",4331 ]),4332 hdrs = glob([4333 "include/llvm/MCA/**/*.h",4334 ]),4335 copts = llvm_copts,4336 deps = [4337 ":MC",4338 ":MCDisassembler",4339 ":Object",4340 ":Support",4341 ],4342)4343 4344cc_library(4345 name = "MCAApplication",4346 srcs = glob([4347 "tools/llvm-mca/Views/*.cpp",4348 ]) + [4349 mca_source4350 for mca_source in glob(["tools/llvm-mca/*.cpp"])4351 if mca_source != "tools/llvm-mca/llvm-mca.cpp"4352 ],4353 hdrs = glob([4354 "tools/llvm-mca/*.h",4355 "tools/llvm-mca/Views/*.h",4356 ]),4357 strip_include_prefix = "tools/llvm-mca",4358 deps = [4359 ":MC",4360 ":MCA",4361 ":MCParser",4362 ":Support",4363 ":TargetParser",4364 ],4365)4366 4367cc_library(4368 name = "XRay",4369 srcs = glob([4370 "lib/XRay/*.cpp",4371 ]),4372 hdrs = glob(["include/llvm/XRay/*.h"]),4373 copts = llvm_copts,4374 deps = [4375 ":Object",4376 ":Support",4377 ":TargetParser",4378 ],4379)4380 4381# A flag to pick which `pfm` to use for Exegesis.4382# Usage: `--@llvm-project//llvm:pfm=<disable|external|system>`.4383# Flag documentation: https://bazel.build/extending/config4384string_flag(4385 name = "pfm",4386 build_setting_default = "external",4387 values = [4388 "disable", # Don't include pfm at all4389 "external", # Build pfm from source4390 "system", # Use system pfm (non hermetic)4391 ],4392)4393 4394config_setting(4395 name = "pfm_disable",4396 flag_values = {":pfm": "disable"},4397)4398 4399config_setting(4400 name = "pfm_external",4401 flag_values = {":pfm": "external"},4402)4403 4404config_setting(4405 name = "pfm_system",4406 flag_values = {":pfm": "system"},4407)4408 4409cc_library(4410 name = "maybe_pfm",4411 # We want dependencies of this library to have -DHAVE_LIBPFM conditionally4412 # defined, so we set `defines` instead of `copts`.4413 defines = select({4414 ":pfm_external": ["HAVE_LIBPFM=1"],4415 ":pfm_system": ["HAVE_LIBPFM=1"],4416 "//conditions:default": [],4417 }),4418 deps = select({4419 ":pfm_external": ["@pfm//:pfm_external"],4420 ":pfm_system": ["@pfm//:pfm_system"],4421 "//conditions:default": [],4422 }),4423)4424 4425cc_library(4426 name = "Exegesis",4427 srcs = glob(4428 [4429 "tools/llvm-exegesis/lib/*.cpp",4430 # We have to include these headers here as well as in the `hdrs` below4431 # to allow the `.cpp` files to use file-relative-inclusion to find4432 # them, even though consumers of this library use inclusion relative to4433 # `tools/llvm-exegesis/lib` with the `strip_includes_prefix` of this4434 # library. This mixture appears to be incompatible with header modules.4435 "tools/llvm-exegesis/lib/*.h",4436 ] + [4437 "tools/llvm-exegesis/lib/{}/*.cpp".format(t)4438 for t in llvm_target_exegesis4439 ] + [4440 "tools/llvm-exegesis/lib/{}/*.h".format(t)4441 for t in llvm_target_exegesis4442 ],4443 allow_empty = True,4444 ),4445 hdrs = glob(["tools/llvm-exegesis/lib/*.h"]),4446 copts = llvm_copts,4447 features = [4448 "-header_modules",4449 "-layering_check",4450 ],4451 strip_include_prefix = "tools/llvm-exegesis/lib",4452 deps = [4453 ":AllTargetsAsmParsers",4454 ":AllTargetsCodeGens",4455 ":CodeGen",4456 ":CodeGenTypes",4457 ":Core",4458 ":ExecutionEngine",4459 ":MC",4460 ":MCA",4461 ":MCDisassembler",4462 ":Object",4463 ":ObjectYAML",4464 ":OrcJIT",4465 ":Support",4466 ":Target",4467 ":config",4468 ] + select({4469 "@platforms//os:linux": [":maybe_pfm"],4470 "//conditions:default": [],4471 }),4472)4473 4474################################################################################4475# LLVM toolchain and development binaries4476 4477gentbl_cc_library(4478 name = "DsymutilTableGen",4479 strip_include_prefix = "tools/dsymutil",4480 tbl_outs = {"tools/dsymutil/Options.inc": ["-gen-opt-parser-defs"]},4481 tblgen = ":llvm-tblgen",4482 td_file = "tools/dsymutil/Options.td",4483 deps = [":OptParserTdFiles"],4484)4485 4486cc_library(4487 name = "dsymutil-lib",4488 srcs = glob([4489 "tools/dsymutil/*.cpp",4490 "tools/dsymutil/*.h",4491 ]),4492 copts = llvm_copts,4493 deps = [4494 ":AllTargetsCodeGens",4495 ":BinaryFormat",4496 ":BitReader",4497 ":BitstreamReader",4498 ":CodeGen",4499 ":CodeGenTypes",4500 ":DWARFLinker",4501 ":DWARFLinkerParallel",4502 ":DebugInfo",4503 ":DebugInfoDWARF",4504 ":DebugInfoDWARFLowLevel",4505 ":DsymutilTableGen",4506 ":MC",4507 ":Object",4508 ":Option",4509 ":Remarks",4510 ":Support",4511 ":Target",4512 ":TargetParser",4513 ":config",4514 ":remark_linker",4515 ],4516)4517 4518llvm_driver_cc_binary(4519 name = "dsymutil",4520 stamp = 0,4521 deps = [":dsymutil-lib"],4522)4523 4524cc_binary(4525 name = "llc",4526 srcs = glob([4527 "tools/llc/*.cpp",4528 "tools/llc/*.h",4529 ]),4530 copts = llvm_copts,4531 stamp = 0,4532 deps = [4533 ":AllTargetsAsmParsers",4534 ":AllTargetsCodeGens",4535 ":Analysis",4536 ":AsmParser",4537 ":BitReader",4538 ":CodeGen",4539 ":CodeGenTypes",4540 ":Core",4541 ":IRPrinter",4542 ":IRReader",4543 ":MC",4544 ":Passes",4545 ":Remarks",4546 ":Scalar",4547 ":Support",4548 ":Target",4549 ":TargetParser",4550 ":TransformUtils",4551 ],4552)4553 4554cc_binary(4555 name = "lli",4556 srcs = glob([4557 "tools/lli/*.cpp",4558 "tools/lli/*.h",4559 ]),4560 copts = llvm_copts,4561 # ll scripts rely on symbols from dependent4562 # libraries being resolvable.4563 linkopts = select({4564 "@platforms//os:windows": [],4565 "@platforms//os:macos": [],4566 "//conditions:default": [4567 "-Wl,--undefined=_ZTIi",4568 "-Wl,--export-dynamic-symbol=_ZTIi",4569 "-Wl,--export-dynamic-symbol=__cxa_begin_catch",4570 "-Wl,--export-dynamic-symbol=__cxa_end_catch",4571 "-Wl,--export-dynamic-symbol=__gxx_personality_v0",4572 "-Wl,--export-dynamic-symbol=__cxa_allocate_exception",4573 "-Wl,--export-dynamic-symbol=__cxa_throw",4574 "-Wl,--export-dynamic-symbol=llvm_orc_registerJITLoaderGDBAllocAction",4575 "-Wl,--export-dynamic-symbol=llvm_orc_registerEHFrameSectionWrapper",4576 "-Wl,--export-dynamic-symbol=llvm_orc_deregisterEHFrameSectionWrapper",4577 ],4578 }),4579 stamp = 0,4580 deps = [4581 ":AllTargetsAsmParsers",4582 ":AllTargetsCodeGens",4583 ":AsmParser",4584 ":BitReader",4585 ":CodeGen",4586 ":Core",4587 ":ExecutionEngine",4588 ":IRPrinter",4589 ":IRReader",4590 ":Instrumentation",4591 ":Interpreter",4592 ":MCJIT",4593 ":Object",4594 ":OrcDebugging",4595 ":OrcJIT",4596 ":OrcTargetProcess",4597 ":Support",4598 ":TargetParser",4599 ":config",4600 ],4601)4602 4603cc_library(4604 name = "llvm-ar-lib",4605 srcs = glob(["tools/llvm-ar/*.cpp"]),4606 copts = llvm_copts,4607 deps = [4608 ":AllTargetsAsmParsers",4609 ":AllTargetsCodeGens",4610 ":BinaryFormat",4611 ":Core",4612 ":DlltoolDriver",4613 ":LibDriver",4614 ":Object",4615 ":Support",4616 ":TargetParser",4617 ],4618)4619 4620llvm_driver_cc_binary(4621 name = "llvm-ar",4622 stamp = 0,4623 deps = [":llvm-ar-lib"],4624)4625 4626# We need to run llvm-ar with different basenames to make it run with4627# different behavior.4628binary_alias(4629 name = "llvm-dlltool",4630 binary = ":llvm-ar",4631)4632 4633binary_alias(4634 name = "llvm-lib",4635 binary = ":llvm-ar",4636)4637 4638binary_alias(4639 name = "llvm-ranlib",4640 binary = ":llvm-ar",4641)4642 4643cc_binary(4644 name = "llvm-as",4645 srcs = glob([4646 "tools/llvm-as/*.cpp",4647 ]),4648 copts = llvm_copts,4649 stamp = 0,4650 deps = [4651 ":Analysis",4652 ":AsmParser",4653 ":BitWriter",4654 ":Core",4655 ":Support",4656 ],4657)4658 4659cc_binary(4660 name = "llvm-bcanalyzer",4661 srcs = glob([4662 "tools/llvm-bcanalyzer/*.cpp",4663 ]),4664 copts = llvm_copts,4665 stamp = 0,4666 deps = [4667 ":BitReader",4668 ":Support",4669 ],4670)4671 4672cc_binary(4673 name = "llvm-cat",4674 srcs = glob([4675 "tools/llvm-cat/*.cpp",4676 ]),4677 copts = llvm_copts,4678 stamp = 0,4679 deps = [4680 ":BitReader",4681 ":BitWriter",4682 ":Core",4683 ":IRPrinter",4684 ":IRReader",4685 ":Support",4686 ],4687)4688 4689gentbl_cc_library(4690 name = "CGDataOptsTableGen",4691 strip_include_prefix = "tools/llvm-cgdata",4692 tbl_outs = {"tools/llvm-cgdata/Opts.inc": ["-gen-opt-parser-defs"]},4693 tblgen = ":llvm-tblgen",4694 td_file = "tools/llvm-cgdata/Opts.td",4695 deps = [":OptParserTdFiles"],4696)4697 4698cc_library(4699 name = "llvm-cgdata-lib",4700 srcs = glob(["tools/llvm-cgdata/*.cpp"]),4701 copts = llvm_copts,4702 deps = [4703 ":CGData",4704 ":CGDataOptsTableGen",4705 ":CodeGen",4706 ":Core",4707 ":Object",4708 ":Option",4709 ":Support",4710 ],4711)4712 4713llvm_driver_cc_binary(4714 name = "llvm-cgdata",4715 stamp = 0,4716 deps = [":llvm-cgdata-lib"],4717)4718 4719cc_binary(4720 name = "llvm-cfi-verify",4721 srcs = glob([4722 "tools/llvm-cfi-verify/*.cpp",4723 "tools/llvm-cfi-verify/lib/*.cpp",4724 "tools/llvm-cfi-verify/lib/*.h",4725 ]),4726 copts = llvm_copts,4727 stamp = 0,4728 deps = [4729 ":AllTargetsAsmParsers",4730 ":AllTargetsCodeGens",4731 ":AllTargetsDisassemblers",4732 ":BinaryFormat",4733 ":DebugInfoDWARF",4734 ":MC",4735 ":MCDisassembler",4736 ":MCParser",4737 ":Object",4738 ":Support",4739 ":Symbolize",4740 ],4741)4742 4743cc_binary(4744 name = "llvm-cov",4745 srcs = glob([4746 "tools/llvm-cov/*.cpp",4747 "tools/llvm-cov/*.h",4748 ]),4749 copts = llvm_copts,4750 stamp = 0,4751 deps = [4752 ":Coverage",4753 ":Debuginfod",4754 ":Instrumentation",4755 ":Object",4756 ":ProfileData",4757 ":Support",4758 ":TargetParser",4759 ":config",4760 ],4761)4762 4763gentbl_cc_library(4764 name = "CvtResTableGen",4765 strip_include_prefix = "tools/llvm-cvtres",4766 tbl_outs = {"tools/llvm-cvtres/Opts.inc": ["-gen-opt-parser-defs"]},4767 tblgen = ":llvm-tblgen",4768 td_file = "tools/llvm-cvtres/Opts.td",4769 deps = [":OptParserTdFiles"],4770)4771 4772cc_binary(4773 name = "llvm-cvtres",4774 srcs = glob([4775 "tools/llvm-cvtres/*.cpp",4776 ]),4777 copts = llvm_copts,4778 stamp = 0,4779 deps = [4780 ":BinaryFormat",4781 ":CvtResTableGen",4782 ":Object",4783 ":Option",4784 ":Support",4785 ],4786)4787 4788cc_binary(4789 name = "llvm-cxxdump",4790 srcs = glob([4791 "tools/llvm-cxxdump/*.cpp",4792 "tools/llvm-cxxdump/*.h",4793 ]),4794 copts = llvm_copts,4795 stamp = 0,4796 deps = [4797 ":AllTargetsCodeGens",4798 ":BitReader",4799 ":MC",4800 ":Object",4801 ":Support",4802 ],4803)4804 4805cc_binary(4806 name = "llvm-cxxmap",4807 srcs = glob([4808 "tools/llvm-cxxmap/*.cpp",4809 ]),4810 copts = llvm_copts,4811 stamp = 0,4812 deps = [4813 ":ProfileData",4814 ":Support",4815 ],4816)4817 4818gentbl_cc_library(4819 name = "CxxfiltOptsTableGen",4820 strip_include_prefix = "tools/llvm-cxxfilt",4821 tbl_outs = {"tools/llvm-cxxfilt/Opts.inc": ["-gen-opt-parser-defs"]},4822 tblgen = ":llvm-tblgen",4823 td_file = "tools/llvm-cxxfilt/Opts.td",4824 deps = [":OptParserTdFiles"],4825)4826 4827cc_library(4828 name = "llvm-cxxfilt-lib",4829 srcs = glob(["tools/llvm-cxxfilt/*.cpp"]),4830 copts = llvm_copts,4831 deps = [4832 ":CxxfiltOptsTableGen",4833 ":Demangle",4834 ":Option",4835 ":Support",4836 ":TargetParser",4837 ],4838)4839 4840llvm_driver_cc_binary(4841 name = "llvm-cxxfilt",4842 stamp = 0,4843 deps = [":llvm-cxxfilt-lib"],4844)4845 4846cc_binary(4847 name = "llvm-debuginfo-analyzer",4848 srcs = glob([4849 "tools/llvm-debuginfo-analyzer/*.cpp",4850 "tools/llvm-debuginfo-analyzer/*.h",4851 ]),4852 copts = llvm_copts,4853 stamp = 0,4854 deps = [4855 ":AllTargetsCodeGens",4856 ":AllTargetsDisassemblers",4857 ":DebugInfoLogicalView",4858 ":Support",4859 ],4860)4861 4862gentbl_cc_library(4863 name = "DebugInfodFindOptsTableGen",4864 strip_include_prefix = "tools/llvm-debuginfod-find",4865 tbl_outs = {"tools/llvm-debuginfod-find/Opts.inc": ["-gen-opt-parser-defs"]},4866 tblgen = ":llvm-tblgen",4867 td_file = "tools/llvm-debuginfod-find/Opts.td",4868 deps = [":OptParserTdFiles"],4869)4870 4871cc_library(4872 name = "llvm-debuginfod-find-lib",4873 srcs = glob([4874 "tools/llvm-debuginfod-find/*.cpp",4875 ]),4876 copts = llvm_copts,4877 deps = [4878 ":BitReader",4879 ":Core",4880 ":DebugInfodFindOptsTableGen",4881 ":Debuginfod",4882 ":Option",4883 ":Support",4884 ":Symbolize",4885 ],4886)4887 4888llvm_driver_cc_binary(4889 name = "llvm-debuginfod-find",4890 stamp = 0,4891 deps = [":llvm-debuginfod-find-lib"],4892)4893 4894cc_binary(4895 name = "llvm-dis",4896 srcs = glob([4897 "tools/llvm-dis/*.cpp",4898 ]),4899 copts = llvm_copts,4900 stamp = 0,4901 deps = [4902 ":Analysis",4903 ":BitReader",4904 ":Core",4905 ":Support",4906 ],4907)4908 4909cc_binary(4910 name = "llvm-dwarfdump",4911 srcs = glob([4912 "tools/llvm-dwarfdump/*.cpp",4913 "tools/llvm-dwarfdump/*.h",4914 ]),4915 copts = llvm_copts,4916 stamp = 0,4917 deps = [4918 ":AllTargetsCodeGens",4919 ":BinaryFormat",4920 ":DebugInfo",4921 ":DebugInfoDWARF",4922 ":DebugInfoDWARFLowLevel",4923 ":MC",4924 ":Object",4925 ":Support",4926 ":TargetParser",4927 ],4928)4929 4930gentbl_cc_library(4931 name = "DwarfutilOptionsTableGen",4932 strip_include_prefix = "tools/llvm-dwarfutil",4933 tbl_outs = {"tools/llvm-dwarfutil/Options.inc": ["-gen-opt-parser-defs"]},4934 tblgen = ":llvm-tblgen",4935 td_file = "tools/llvm-dwarfutil/Options.td",4936 deps = [":OptParserTdFiles"],4937)4938 4939cc_binary(4940 name = "llvm-dwarfutil",4941 srcs = glob([4942 "tools/llvm-dwarfutil/*.cpp",4943 "tools/llvm-dwarfutil/*.h",4944 ]),4945 copts = llvm_copts,4946 stamp = 0,4947 deps = [4948 ":AllTargetsAsmParsers",4949 ":AllTargetsCodeGens",4950 ":CodeGenTypes",4951 ":DWARFLinker",4952 ":DWARFLinkerParallel",4953 ":DebugInfoDWARF",4954 ":DebugInfoDWARFLowLevel",4955 ":DwarfutilOptionsTableGen",4956 ":MC",4957 ":ObjCopy",4958 ":Object",4959 ":Option",4960 ":Support",4961 ":Target",4962 ":TargetParser",4963 ],4964)4965 4966gentbl_cc_library(4967 name = "DwpOptionsTableGen",4968 strip_include_prefix = "tools/llvm-dwp",4969 tbl_outs = {"tools/llvm-dwp/Opts.inc": ["-gen-opt-parser-defs"]},4970 tblgen = ":llvm-tblgen",4971 td_file = "tools/llvm-dwp/Opts.td",4972 deps = [":OptParserTdFiles"],4973)4974 4975cc_library(4976 name = "llvm-dwp-lib",4977 srcs = glob(["tools/llvm-dwp/*.cpp"]),4978 copts = llvm_copts,4979 deps = [4980 ":AllTargetsCodeGens",4981 ":DWP",4982 ":DwpOptionsTableGen",4983 ":MC",4984 ":Option",4985 ":Support",4986 ],4987)4988 4989llvm_driver_cc_binary(4990 name = "llvm-dwp",4991 stamp = 0,4992 deps = [":llvm-dwp-lib"],4993)4994 4995cc_binary(4996 name = "llvm-exegesis",4997 srcs = [4998 "tools/llvm-exegesis/llvm-exegesis.cpp",4999 ],5000 copts = llvm_copts,5001 stamp = 0,5002 deps = [5003 ":AllTargetsAsmParsers",5004 ":AllTargetsCodeGens",5005 ":AllTargetsDisassemblers",5006 ":CodeGenTypes",5007 ":Exegesis",5008 ":MC",5009 ":MCParser",5010 ":Object",5011 ":Support",5012 ":TargetParser",5013 ":config",5014 ],5015)5016 5017cc_binary(5018 name = "llvm-extract",5019 srcs = glob([5020 "tools/llvm-extract/*.cpp",5021 ]),5022 copts = llvm_copts,5023 stamp = 0,5024 deps = [5025 ":AsmParser",5026 ":BitReader",5027 ":BitWriter",5028 ":Core",5029 ":IPO",5030 ":IRPrinter",5031 ":IRReader",5032 ":Passes",5033 ":Support",5034 ],5035)5036 5037gentbl_cc_library(5038 name = "GSYMUtilOptionsTableGen",5039 strip_include_prefix = "tools/llvm-gsymutil",5040 tbl_outs = {"tools/llvm-gsymutil/Opts.inc": ["-gen-opt-parser-defs"]},5041 tblgen = ":llvm-tblgen",5042 td_file = "tools/llvm-gsymutil/Opts.td",5043 deps = [":OptParserTdFiles"],5044)5045 5046cc_library(5047 name = "llvm-gsymutil-lib",5048 srcs = glob(["tools/llvm-gsymutil/*.cpp"]),5049 copts = llvm_copts,5050 deps = [5051 ":AllTargetsCodeGens",5052 ":DebugInfo",5053 ":DebugInfoDWARF",5054 ":DebugInfoGSYM",5055 ":GSYMUtilOptionsTableGen",5056 ":MC",5057 ":Object",5058 ":Option",5059 ":Support",5060 ":Target",5061 ":TargetParser",5062 ],5063)5064 5065llvm_driver_cc_binary(5066 name = "llvm-gsymutil",5067 stamp = 0,5068 deps = [":llvm-gsymutil-lib"],5069)5070 5071gentbl_cc_library(5072 name = "IfsOptionsTableGen",5073 strip_include_prefix = "tools/llvm-ifs",5074 tbl_outs = {"tools/llvm-ifs/Opts.inc": ["-gen-opt-parser-defs"]},5075 tblgen = ":llvm-tblgen",5076 td_file = "tools/llvm-ifs/Opts.td",5077 deps = [":OptParserTdFiles"],5078)5079 5080cc_library(5081 name = "llvm-ifs-lib",5082 srcs = glob([5083 "tools/llvm-ifs/*.cpp",5084 "tools/llvm-ifs/*.h",5085 ]),5086 copts = llvm_copts,5087 deps = [5088 ":BinaryFormat",5089 ":IfsOptionsTableGen",5090 ":InterfaceStub",5091 ":ObjectYAML",5092 ":Option",5093 ":Support",5094 ":TargetParser",5095 ":TextAPI",5096 ],5097)5098 5099llvm_driver_cc_binary(5100 name = "llvm-ifs",5101 stamp = 0,5102 deps = [":llvm-ifs-lib"],5103)5104 5105cc_binary(5106 name = "llvm-jitlink",5107 srcs = glob([5108 "tools/llvm-jitlink/*.cpp",5109 "tools/llvm-jitlink/*.h",5110 ]),5111 copts = llvm_copts,5112 # Make symbols from the standard library dynamically resolvable.5113 linkopts = select({5114 "@platforms//os:windows": [],5115 "@platforms//os:macos": [],5116 "//conditions:default": [5117 "-Wl,--undefined=_ZTIi",5118 "-Wl,--export-dynamic-symbol=_ZTIi",5119 "-Wl,--export-dynamic-symbol=__cxa_begin_catch",5120 "-Wl,--export-dynamic-symbol=__cxa_end_catch",5121 "-Wl,--export-dynamic-symbol=__gxx_personality_v0",5122 "-Wl,--export-dynamic-symbol=__cxa_allocate_exception",5123 "-Wl,--export-dynamic-symbol=__cxa_throw",5124 "-Wl,--export-dynamic-symbol=llvm_orc_registerJITLoaderGDBAllocAction",5125 ],5126 }),5127 stamp = 0,5128 deps = [5129 ":AllTargetsAsmParsers",5130 ":AllTargetsCodeGens",5131 ":AllTargetsDisassemblers",5132 ":AsmParser",5133 ":BinaryFormat",5134 ":BitReader",5135 ":CodeGen",5136 ":ExecutionEngine",5137 ":MC",5138 ":MCDisassembler",5139 ":MCJIT",5140 ":Object",5141 ":OrcDebugging",5142 ":OrcJIT",5143 ":OrcShared",5144 ":OrcTargetProcess",5145 ":Support",5146 ":TargetParser",5147 ":config",5148 ],5149)5150 5151gentbl_cc_library(5152 name = "LibtoolDarwinOptionsTableGen",5153 strip_include_prefix = "tools/llvm-libtool-darwin",5154 tbl_outs = {"tools/llvm-libtool-darwin/Opts.inc": ["-gen-opt-parser-defs"]},5155 tblgen = ":llvm-tblgen",5156 td_file = "tools/llvm-libtool-darwin/Opts.td",5157 deps = [":OptParserTdFiles"],5158)5159 5160cc_library(5161 name = "llvm-libtool-darwin-lib",5162 srcs = glob([5163 "tools/llvm-libtool-darwin/*.cpp",5164 "tools/llvm-libtool-darwin/*.h",5165 ]),5166 copts = llvm_copts,5167 deps = [5168 ":AllTargetsAsmParsers",5169 ":AllTargetsCodeGens",5170 ":BinaryFormat",5171 ":Core",5172 ":LibtoolDarwinOptionsTableGen",5173 ":Object",5174 ":Option",5175 ":Support",5176 ":TextAPI",5177 ],5178)5179 5180llvm_driver_cc_binary(5181 name = "llvm-libtool-darwin",5182 stamp = 0,5183 deps = [":llvm-libtool-darwin-lib"],5184)5185 5186cc_binary(5187 name = "llvm-link",5188 srcs = glob([5189 "tools/llvm-link/*.cpp",5190 ]),5191 copts = llvm_copts,5192 stamp = 0,5193 deps = [5194 ":AsmParser",5195 ":BinaryFormat",5196 ":BitReader",5197 ":BitWriter",5198 ":Core",5199 ":IPO",5200 ":IRPrinter",5201 ":IRReader",5202 ":Linker",5203 ":Object",5204 ":Support",5205 ":TransformUtils",5206 ],5207)5208 5209gentbl_cc_library(5210 name = "LipoOptsTableGen",5211 strip_include_prefix = "tools/llvm-lipo",5212 tbl_outs = {"tools/llvm-lipo/LipoOpts.inc": ["-gen-opt-parser-defs"]},5213 tblgen = ":llvm-tblgen",5214 td_file = "tools/llvm-lipo/LipoOpts.td",5215 deps = [":OptParserTdFiles"],5216)5217 5218cc_library(5219 name = "llvm-lipo-lib",5220 srcs = ["tools/llvm-lipo/llvm-lipo.cpp"],5221 copts = llvm_copts,5222 deps = [5223 ":AllTargetsAsmParsers",5224 ":BinaryFormat",5225 ":Core",5226 ":LipoOptsTableGen",5227 ":Object",5228 ":Option",5229 ":Support",5230 ":TargetParser",5231 ":TextAPI",5232 ],5233)5234 5235llvm_driver_cc_binary(5236 name = "llvm-lipo",5237 stamp = 0,5238 deps = [":llvm-lipo-lib"],5239)5240 5241cc_binary(5242 name = "llvm-lto",5243 srcs = glob([5244 "tools/llvm-lto/*.cpp",5245 ]),5246 copts = llvm_copts,5247 stamp = 0,5248 deps = [5249 ":AllTargetsAsmParsers",5250 ":AllTargetsCodeGens",5251 ":BitReader",5252 ":BitWriter",5253 ":CodeGen",5254 ":Core",5255 ":IRPrinter",5256 ":IRReader",5257 ":LTO",5258 ":Support",5259 ":Target",5260 ],5261)5262 5263cc_binary(5264 name = "llvm-lto2",5265 srcs = glob([5266 "tools/llvm-lto2/*.cpp",5267 ]),5268 copts = llvm_copts,5269 stamp = 0,5270 deps = [5271 ":AllTargetsAsmParsers",5272 ":AllTargetsCodeGens",5273 ":BitReader",5274 ":CodeGen",5275 ":Core",5276 ":LTO",5277 ":Passes",5278 ":Remarks",5279 ":Support",5280 ],5281)5282 5283cc_binary(5284 name = "llvm-mc",5285 srcs = glob([5286 "tools/llvm-mc/*.cpp",5287 "tools/llvm-mc/*.h",5288 ]),5289 copts = llvm_copts,5290 stamp = 0,5291 deps = [5292 ":AllTargetsAsmParsers",5293 ":AllTargetsCodeGens",5294 ":AllTargetsDisassemblers",5295 ":DWARFCFIChecker",5296 ":MC",5297 ":MCDisassembler",5298 ":MCParser",5299 ":Object",5300 ":Support",5301 ":TargetParser",5302 ],5303)5304 5305cc_binary(5306 name = "llvm-mca",5307 srcs = [5308 "tools/llvm-mca/llvm-mca.cpp",5309 ],5310 copts = llvm_copts,5311 stamp = 0,5312 deps = [5313 ":AllTargetsAsmParsers",5314 ":AllTargetsCodeGens",5315 ":AllTargetsDisassemblers",5316 ":AllTargetsMCAs",5317 ":MC",5318 ":MCA",5319 ":MCAApplication",5320 ":MCParser",5321 ":Support",5322 ":TargetParser",5323 ],5324)5325 5326gentbl_cc_library(5327 name = "MlTableGen",5328 strip_include_prefix = "tools/llvm-ml",5329 tbl_outs = {"tools/llvm-ml/Opts.inc": ["-gen-opt-parser-defs"]},5330 tblgen = ":llvm-tblgen",5331 td_file = "tools/llvm-ml/Opts.td",5332 deps = [":OptParserTdFiles"],5333)5334 5335cc_library(5336 name = "llvm-ml-lib",5337 srcs = glob([5338 "tools/llvm-ml/*.cpp",5339 "tools/llvm-ml/*.h",5340 ]),5341 copts = llvm_copts,5342 deps = [5343 ":AllTargetsAsmParsers",5344 ":AllTargetsCodeGens",5345 ":AllTargetsDisassemblers",5346 ":MC",5347 ":MCDisassembler",5348 ":MCParser",5349 ":MlTableGen",5350 ":Option",5351 ":Support",5352 ":TargetParser",5353 ],5354)5355 5356llvm_driver_cc_binary(5357 name = "llvm-ml",5358 stamp = 0,5359 deps = [":llvm-ml-lib"],5360)5361 5362binary_alias(5363 name = "llvm-ml64",5364 binary = ":llvm-ml",5365)5366 5367cc_binary(5368 name = "llvm-modextract",5369 srcs = glob([5370 "tools/llvm-modextract/*.cpp",5371 ]),5372 copts = llvm_copts,5373 stamp = 0,5374 deps = [5375 ":BitReader",5376 ":BitWriter",5377 ":IRPrinter",5378 ":IRReader",5379 ":Support",5380 ],5381)5382 5383gentbl_cc_library(5384 name = "MtTableGen",5385 strip_include_prefix = "tools/llvm-mt",5386 tbl_outs = {"tools/llvm-mt/Opts.inc": ["-gen-opt-parser-defs"]},5387 tblgen = ":llvm-tblgen",5388 td_file = "tools/llvm-mt/Opts.td",5389 deps = [":OptParserTdFiles"],5390)5391 5392cc_library(5393 name = "llvm-mt-lib",5394 srcs = glob(["tools/llvm-mt/*.cpp"]),5395 copts = llvm_copts,5396 deps = [5397 ":MtTableGen",5398 ":Option",5399 ":Support",5400 ":WindowsManifest",5401 ":config",5402 ],5403)5404 5405llvm_driver_cc_binary(5406 name = "llvm-mt",5407 stamp = 0,5408 deps = [":llvm-mt-lib"],5409)5410 5411gentbl_cc_library(5412 name = "NmOptsTableGen",5413 strip_include_prefix = "tools/llvm-nm",5414 tbl_outs = {"tools/llvm-nm/Opts.inc": ["-gen-opt-parser-defs"]},5415 tblgen = ":llvm-tblgen",5416 td_file = "tools/llvm-nm/Opts.td",5417 deps = [":OptParserTdFiles"],5418)5419 5420cc_library(5421 name = "llvm-nm-lib",5422 srcs = glob(["tools/llvm-nm/*.cpp"]),5423 copts = llvm_copts,5424 deps = [5425 ":AllTargetsAsmParsers",5426 ":AllTargetsCodeGens",5427 ":BinaryFormat",5428 ":BitReader",5429 ":Core",5430 ":Demangle",5431 ":NmOptsTableGen",5432 ":Object",5433 ":Option",5434 ":Support",5435 ":Symbolize",5436 ":TargetParser",5437 ],5438)5439 5440llvm_driver_cc_binary(5441 name = "llvm-nm",5442 stamp = 0,5443 deps = [":llvm-nm-lib"],5444)5445 5446td_library(5447 name = "LlvmObjcopyCommonOpts",5448 srcs = ["tools/llvm-objcopy/CommonOpts.td"],5449)5450 5451gentbl_cc_library(5452 name = "llvm-objcopy-opts",5453 strip_include_prefix = "tools/llvm-objcopy",5454 tbl_outs = {"tools/llvm-objcopy/ObjcopyOpts.inc": ["-gen-opt-parser-defs"]},5455 tblgen = ":llvm-tblgen",5456 td_file = "tools/llvm-objcopy/ObjcopyOpts.td",5457 deps = [5458 ":LlvmObjcopyCommonOpts",5459 ":OptParserTdFiles",5460 ],5461)5462 5463gentbl_cc_library(5464 name = "llvm-installnametool-opts",5465 strip_include_prefix = "tools/llvm-objcopy",5466 tbl_outs = {"tools/llvm-objcopy/InstallNameToolOpts.inc": ["-gen-opt-parser-defs"]},5467 tblgen = ":llvm-tblgen",5468 td_file = "tools/llvm-objcopy/InstallNameToolOpts.td",5469 deps = [5470 ":LlvmObjcopyCommonOpts",5471 ":OptParserTdFiles",5472 ],5473)5474 5475gentbl_cc_library(5476 name = "llvm-strip-opts",5477 strip_include_prefix = "tools/llvm-objcopy",5478 tbl_outs = {"tools/llvm-objcopy/StripOpts.inc": ["-gen-opt-parser-defs"]},5479 tblgen = ":llvm-tblgen",5480 td_file = "tools/llvm-objcopy/StripOpts.td",5481 deps = [5482 ":LlvmObjcopyCommonOpts",5483 ":OptParserTdFiles",5484 ],5485)5486 5487gentbl_cc_library(5488 name = "llvm-bitcode-strip-opts",5489 strip_include_prefix = "tools/llvm-objcopy",5490 tbl_outs = {"tools/llvm-objcopy/BitcodeStripOpts.inc": ["-gen-opt-parser-defs"]},5491 tblgen = ":llvm-tblgen",5492 td_file = "tools/llvm-objcopy/BitcodeStripOpts.td",5493 deps = [5494 ":LlvmObjcopyCommonOpts",5495 ":OptParserTdFiles",5496 ],5497)5498 5499cc_binary(5500 name = "llvm-stress",5501 srcs = glob([5502 "tools/llvm-stress/*.cpp",5503 ]),5504 copts = llvm_copts,5505 stamp = 0,5506 deps = [5507 ":Core",5508 ":Support",5509 ],5510)5511 5512cc_library(5513 name = "llvm-objcopy-lib",5514 srcs = glob([5515 "tools/llvm-objcopy/*.cpp",5516 "tools/llvm-objcopy/*.h",5517 ]),5518 copts = llvm_copts,5519 deps = [5520 ":BinaryFormat",5521 ":MC",5522 ":ObjCopy",5523 ":Object",5524 ":ObjectYAML",5525 ":Option",5526 ":Support",5527 ":Target",5528 ":TargetParser",5529 ":llvm-bitcode-strip-opts",5530 ":llvm-installnametool-opts",5531 ":llvm-objcopy-opts",5532 ":llvm-strip-opts",5533 ],5534)5535 5536llvm_driver_cc_binary(5537 name = "llvm-objcopy",5538 stamp = 0,5539 deps = [":llvm-objcopy-lib"],5540)5541 5542binary_alias(5543 name = "llvm-strip",5544 binary = ":llvm-objcopy",5545)5546 5547binary_alias(5548 name = "llvm-bitcode-strip",5549 binary = ":llvm-objcopy",5550)5551 5552binary_alias(5553 name = "llvm-install-name-tool",5554 binary = ":llvm-objcopy",5555)5556 5557cc_library(5558 name = "llvm-objdump-lib",5559 srcs = glob([5560 "tools/llvm-objdump/*.cpp",5561 "tools/llvm-objdump/*.h",5562 ]),5563 copts = llvm_copts,5564 deps = [5565 ":AllTargetsAsmParsers",5566 ":AllTargetsCodeGens",5567 ":AllTargetsDisassemblers",5568 ":BinaryFormat",5569 ":CodeGen",5570 ":DebugInfo",5571 ":DebugInfoBTF",5572 ":DebugInfoDWARF",5573 ":DebugInfoDWARFLowLevel",5574 ":Debuginfod",5575 ":Demangle",5576 ":MC",5577 ":MCDisassembler",5578 ":ObjdumpOptsTableGen",5579 ":Object",5580 ":Option",5581 ":OtoolOptsTableGen",5582 ":Support",5583 ":Symbolize",5584 ":TargetParser",5585 ":config",5586 ],5587)5588 5589llvm_driver_cc_binary(5590 name = "llvm-objdump",5591 stamp = 0,5592 deps = [":llvm-objdump-lib"],5593)5594 5595gentbl_cc_library(5596 name = "ObjdumpOptsTableGen",5597 strip_include_prefix = "tools/llvm-objdump",5598 tbl_outs = {"tools/llvm-objdump/ObjdumpOpts.inc": ["-gen-opt-parser-defs"]},5599 tblgen = ":llvm-tblgen",5600 td_file = "tools/llvm-objdump/ObjdumpOpts.td",5601 deps = [":OptParserTdFiles"],5602)5603 5604binary_alias(5605 name = "llvm-otool",5606 binary = ":llvm-objdump",5607)5608 5609gentbl_cc_library(5610 name = "OtoolOptsTableGen",5611 strip_include_prefix = "tools/llvm-objdump",5612 tbl_outs = {"tools/llvm-objdump/OtoolOpts.inc": ["-gen-opt-parser-defs"]},5613 tblgen = ":llvm-tblgen",5614 td_file = "tools/llvm-objdump/OtoolOpts.td",5615 deps = [":OptParserTdFiles"],5616)5617 5618cc_binary(5619 name = "llvm-opt-report",5620 srcs = glob([5621 "tools/llvm-opt-report/*.cpp",5622 ]),5623 copts = llvm_copts,5624 stamp = 0,5625 deps = [5626 ":AllTargetsCodeGens",5627 ":Demangle",5628 ":Remarks",5629 ":Support",5630 ],5631)5632 5633cc_binary(5634 name = "llvm-offload-wrapper",5635 srcs = glob([5636 "tools/llvm-offload-wrapper/*.cpp",5637 ]),5638 copts = llvm_copts,5639 stamp = 0,5640 deps = [5641 ":BitWriter",5642 ":Core",5643 ":FrontendOffloading",5644 ":Object",5645 ":Option",5646 ":Support",5647 ":TargetParser",5648 ":intrinsic_enums_gen",5649 ],5650)5651 5652cc_binary(5653 name = "llvm-offload-binary",5654 srcs = glob(["tools/llvm-offload-binary/*.cpp"]),5655 stamp = 0,5656 deps = [5657 "//llvm:BinaryFormat",5658 "//llvm:Object",5659 "//llvm:Support",5660 ],5661)5662 5663cc_binary(5664 name = "llvm-pdbutil",5665 srcs = glob([5666 "tools/llvm-pdbutil/*.cpp",5667 "tools/llvm-pdbutil/*.h",5668 ]),5669 copts = llvm_copts,5670 stamp = 0,5671 deps = [5672 ":BinaryFormat",5673 ":DebugInfoBTF",5674 ":DebugInfoCodeView",5675 ":DebugInfoMSF",5676 ":DebugInfoPDB",5677 ":Object",5678 ":ObjectYAML",5679 ":Support",5680 ":config",5681 ],5682)5683 5684cc_library(5685 name = "llvm-profdata-lib",5686 srcs = glob(["tools/llvm-profdata/*.cpp"]),5687 copts = llvm_copts,5688 deps = [5689 ":Core",5690 ":Debuginfod",5691 ":Object",5692 ":ProfileData",5693 ":Support",5694 ],5695)5696 5697cc_binary(5698 name = "llvm-profdata",5699 stamp = 0,5700 deps = [":llvm-profdata-lib"],5701)5702 5703cc_binary(5704 name = "llvm-profgen",5705 srcs = glob([5706 "tools/llvm-profgen/*.cpp",5707 "tools/llvm-profgen/*.h",5708 ]),5709 copts = llvm_copts,5710 stamp = 0,5711 deps = [5712 ":AllTargetsCodeGens",5713 ":AllTargetsDisassemblers",5714 ":Core",5715 ":DebugInfoDWARF",5716 ":Demangle",5717 ":IPO",5718 ":MC",5719 ":MCDisassembler",5720 ":Object",5721 ":ProfileData",5722 ":Support",5723 ":Symbolize",5724 ":TargetParser",5725 ],5726)5727 5728gentbl_cc_library(5729 name = "RcTableGen",5730 strip_include_prefix = "tools/llvm-rc",5731 tbl_outs = {"tools/llvm-rc/Opts.inc": ["-gen-opt-parser-defs"]},5732 tblgen = ":llvm-tblgen",5733 td_file = "tools/llvm-rc/Opts.td",5734 deps = [":OptParserTdFiles"],5735)5736 5737gentbl_cc_library(5738 name = "WindresTableGen",5739 strip_include_prefix = "tools/llvm-rc",5740 tbl_outs = {"tools/llvm-rc/WindresOpts.inc": ["-gen-opt-parser-defs"]},5741 tblgen = ":llvm-tblgen",5742 td_file = "tools/llvm-rc/WindresOpts.td",5743 deps = [":OptParserTdFiles"],5744)5745 5746# Workaround inability to put `.def` files into `srcs` with a library.5747cc_library(5748 name = "llvm-rc-defs-lib",5749 textual_hdrs = glob(["tools/llvm-rc/*.def"]),5750)5751 5752cc_library(5753 name = "llvm-rc-lib",5754 srcs = glob([5755 "tools/llvm-rc/*.cpp",5756 "tools/llvm-rc/*.h",5757 ]),5758 copts = llvm_copts,5759 deps = [5760 ":Object",5761 ":Option",5762 ":RcTableGen",5763 ":Support",5764 ":TargetParser",5765 ":WindresTableGen",5766 ":config",5767 ":llvm-rc-defs-lib",5768 ],5769)5770 5771llvm_driver_cc_binary(5772 name = "llvm-rc",5773 stamp = 0,5774 deps = [":llvm-rc-lib"],5775)5776 5777binary_alias(5778 name = "llvm-windres",5779 binary = ":llvm-rc",5780)5781 5782gentbl_cc_library(5783 name = "ReadobjOptsTableGen",5784 strip_include_prefix = "tools/llvm-readobj",5785 tbl_outs = {"tools/llvm-readobj/Opts.inc": ["-gen-opt-parser-defs"]},5786 tblgen = ":llvm-tblgen",5787 td_file = "tools/llvm-readobj/Opts.td",5788 deps = [":OptParserTdFiles"],5789)5790 5791cc_library(5792 name = "llvm-readobj-lib",5793 srcs = glob([5794 "tools/llvm-readobj/*.cpp",5795 "tools/llvm-readobj/*.h",5796 ]),5797 copts = llvm_copts,5798 deps = [5799 ":AllTargetsCodeGens",5800 ":BinaryFormat",5801 ":BitReader",5802 ":DebugInfoCodeView",5803 ":DebugInfoDWARF",5804 ":Demangle",5805 ":MC",5806 ":Object",5807 ":Option",5808 ":ReadobjOptsTableGen",5809 ":Support",5810 ],5811)5812 5813llvm_driver_cc_binary(5814 name = "llvm-readobj",5815 stamp = 0,5816 deps = [":llvm-readobj-lib"],5817)5818 5819# Create an 'llvm-readelf' named binary from the 'llvm-readobj' tool.5820binary_alias(5821 name = "llvm-readelf",5822 binary = ":llvm-readobj",5823)5824 5825# Workaround inability to put `.def` files into `srcs`.5826cc_library(5827 name = "llvm-reduce-defs-lib",5828 textual_hdrs = glob(["tools/llvm-reduce/*.def"]),5829)5830 5831cc_binary(5832 name = "llvm-reduce",5833 srcs = glob([5834 "tools/llvm-reduce/**/*.cpp",5835 "tools/llvm-reduce/**/*.h",5836 ]),5837 copts = llvm_copts,5838 includes = ["tools/llvm-reduce"],5839 stamp = 0,5840 deps = [5841 ":AllTargetsAsmParsers",5842 ":AllTargetsCodeGens",5843 ":Analysis",5844 ":BitReader",5845 ":BitWriter",5846 ":CodeGen",5847 ":CodeGenTypes",5848 ":Core",5849 ":IPO",5850 ":IRReader",5851 ":MC",5852 ":Passes",5853 ":Support",5854 ":Target",5855 ":TargetParser",5856 ":TransformUtils",5857 ":config",5858 ":llvm-reduce-defs-lib",5859 ],5860)5861 5862cc_binary(5863 name = "llvm-remarkutil",5864 srcs = glob([5865 "tools/llvm-remarkutil/**/*.cpp",5866 "tools/llvm-remarkutil/**/*.h",5867 ]),5868 copts = llvm_copts,5869 includes = ["tools/llvm-remarkutil"],5870 stamp = 0,5871 deps = [5872 ":Demangle",5873 ":Remarks",5874 ":Support",5875 ],5876)5877 5878cc_binary(5879 name = "llvm-rtdyld",5880 srcs = glob([5881 "tools/llvm-rtdyld/*.cpp",5882 ]),5883 copts = llvm_copts,5884 stamp = 0,5885 deps = [5886 ":AllTargetsCodeGens",5887 ":AllTargetsDisassemblers",5888 ":DebugInfo",5889 ":DebugInfoDWARF",5890 ":ExecutionEngine",5891 ":MC",5892 ":MCDisassembler",5893 ":Object",5894 ":Support",5895 ],5896)5897 5898gentbl_cc_library(5899 name = "SizeOptsTableGen",5900 strip_include_prefix = "tools/llvm-size",5901 tbl_outs = {"tools/llvm-size/Opts.inc": ["-gen-opt-parser-defs"]},5902 tblgen = ":llvm-tblgen",5903 td_file = "tools/llvm-size/Opts.td",5904 deps = [":OptParserTdFiles"],5905)5906 5907cc_library(5908 name = "llvm-size-lib",5909 srcs = glob(["tools/llvm-size/*.cpp"]),5910 copts = llvm_copts,5911 deps = [5912 ":Object",5913 ":Option",5914 ":SizeOptsTableGen",5915 ":Support",5916 ],5917)5918 5919llvm_driver_cc_binary(5920 name = "llvm-size",5921 stamp = 0,5922 deps = [":llvm-size-lib"],5923)5924 5925cc_binary(5926 name = "llvm-split",5927 srcs = glob([5928 "tools/llvm-split/*.cpp",5929 ]),5930 copts = llvm_copts,5931 stamp = 0,5932 deps = [5933 ":AllTargetsAsmParsers",5934 ":AllTargetsCodeGens",5935 ":BitWriter",5936 ":Core",5937 ":IPO",5938 ":IRPrinter",5939 ":IRReader",5940 ":MC",5941 ":Support",5942 ":Target",5943 ":TargetParser",5944 ":TransformUtils",5945 ],5946)5947 5948gentbl_cc_library(5949 name = "StringsOptsTableGen",5950 strip_include_prefix = "tools/llvm-strings",5951 tbl_outs = {"tools/llvm-strings/Opts.inc": ["-gen-opt-parser-defs"]},5952 tblgen = ":llvm-tblgen",5953 td_file = "tools/llvm-strings/Opts.td",5954 deps = [":OptParserTdFiles"],5955)5956 5957cc_binary(5958 name = "llvm-strings",5959 srcs = glob([5960 "tools/llvm-strings/*.cpp",5961 ]),5962 copts = llvm_copts,5963 stamp = 0,5964 deps = [5965 ":Object",5966 ":Option",5967 ":StringsOptsTableGen",5968 ":Support",5969 ],5970)5971 5972gentbl_cc_library(5973 name = "SymbolizerOptsTableGen",5974 strip_include_prefix = "tools/llvm-symbolizer",5975 tbl_outs = {"tools/llvm-symbolizer/Opts.inc": ["-gen-opt-parser-defs"]},5976 tblgen = ":llvm-tblgen",5977 td_file = "tools/llvm-symbolizer/Opts.td",5978 deps = [":OptParserTdFiles"],5979)5980 5981cc_library(5982 name = "llvm-symbolizer-lib",5983 srcs = glob(["tools/llvm-symbolizer/*.cpp"]),5984 copts = llvm_copts,5985 deps = [5986 ":DebugInfoDWARF",5987 ":DebugInfoPDB",5988 ":Debuginfod",5989 ":Object",5990 ":Option",5991 ":Support",5992 ":Symbolize",5993 ":SymbolizerOptsTableGen",5994 ":config",5995 ],5996)5997 5998llvm_driver_cc_binary(5999 name = "llvm-symbolizer",6000 stamp = 0,6001 deps = [":llvm-symbolizer-lib"],6002)6003 6004binary_alias(6005 name = "llvm-addr2line",6006 binary = ":llvm-symbolizer",6007)6008 6009cc_binary(6010 name = "llvm-undname",6011 srcs = glob([6012 "tools/llvm-undname/*.cpp",6013 ]),6014 copts = llvm_copts,6015 stamp = 0,6016 deps = [6017 ":Demangle",6018 ":Support",6019 ],6020)6021 6022cc_binary(6023 name = "llvm-xray",6024 srcs = glob([6025 "tools/llvm-xray/*.cpp",6026 "tools/llvm-xray/*.h",6027 ]),6028 copts = llvm_copts,6029 stamp = 0,6030 deps = [6031 ":DebugInfoDWARF",6032 ":Object",6033 ":Support",6034 ":Symbolize",6035 ":XRay",6036 ],6037)6038 6039cc_library(6040 name = "opt-driver",6041 srcs = glob([6042 "tools/opt/*.cpp",6043 "tools/opt/*.h",6044 ]),6045 copts = llvm_copts,6046 linkopts = select({6047 "@platforms//os:windows": [],6048 "@platforms//os:macos": [],6049 "//conditions:default": ["-Wl,--export-dynamic"],6050 }),6051 deps = [6052 ":AllTargetsAsmParsers",6053 ":AllTargetsCodeGens",6054 ":Analysis",6055 ":AsmParser",6056 ":BitReader",6057 ":BitWriter",6058 ":CodeGen",6059 ":Core",6060 ":IPO",6061 ":IRPrinter",6062 ":IRReader",6063 ":Instrumentation",6064 ":MC",6065 ":Passes",6066 ":Remarks",6067 ":Scalar",6068 ":Support",6069 ":Target",6070 ":TargetParser",6071 ":TransformUtils",6072 ":common_transforms",6073 ":config",6074 ],6075)6076 6077cc_binary(6078 name = "opt",6079 stamp = 0,6080 deps = [":opt-driver"],6081)6082 6083gentbl_cc_library(6084 name = "SancovOptsTableGen",6085 strip_include_prefix = "tools/sancov",6086 tbl_outs = {"tools/sancov/Opts.inc": ["-gen-opt-parser-defs"]},6087 tblgen = ":llvm-tblgen",6088 td_file = "tools/sancov/Opts.td",6089 deps = [":OptParserTdFiles"],6090)6091 6092cc_library(6093 name = "sancov-lib",6094 srcs = glob(["tools/sancov/*.cpp"]),6095 copts = llvm_copts,6096 deps = [6097 ":AllTargetsCodeGens",6098 ":AllTargetsDisassemblers",6099 ":DebugInfoDWARF",6100 ":DebugInfoPDB",6101 ":MC",6102 ":MCDisassembler",6103 ":Object",6104 ":Option",6105 ":SancovOptsTableGen",6106 ":Support",6107 ":Symbolize",6108 ],6109)6110 6111llvm_driver_cc_binary(6112 name = "sancov",6113 stamp = 0,6114 deps = [":sancov-lib"],6115)6116 6117cc_binary(6118 name = "sanstats",6119 srcs = glob([6120 "tools/sanstats/*.cpp",6121 ]),6122 copts = llvm_copts,6123 stamp = 0,6124 deps = [6125 ":Support",6126 ":Symbolize",6127 ":TransformUtils",6128 ],6129)6130 6131cc_binary(6132 name = "split-file",6133 srcs = glob([6134 "utils/split-file/*.cpp",6135 ]),6136 copts = llvm_copts,6137 stamp = 0,6138 deps = [6139 ":Support",6140 ],6141)6142 6143filegroup(6144 name = "gdb-scripts",6145 srcs = glob(["utils/gdb-scripts/*"]),6146)6147 6148################################################################################6149# Begin testonly libraries6150 6151cc_library(6152 name = "FuzzMutate",6153 testonly = True,6154 srcs = glob(["lib/FuzzMutate/*.cpp"]),6155 hdrs = glob(["include/llvm/FuzzMutate/*.h"]),6156 copts = llvm_copts,6157 includes = ["include"],6158 deps = [6159 ":Analysis",6160 ":BitReader",6161 ":BitWriter",6162 ":Core",6163 ":Scalar",6164 ":Support",6165 ":TargetParser",6166 ":TransformUtils",6167 ],6168)6169 6170cc_library(6171 name = "Diff",6172 testonly = True,6173 srcs = glob(["tools/llvm-diff/lib/*.cpp"]),6174 hdrs = glob(["tools/llvm-diff/lib/*.h"]),6175 deps = [6176 ":Core",6177 ":Support",6178 ],6179)6180 6181py_binary(6182 name = "lit",6183 testonly = True,6184 srcs = ["utils/lit/lit.py"] + glob(["utils/lit/lit/**/*.py"]),6185 imports = ["utils/lit"],6186)6187 6188py_binary(6189 name = "extract_ir",6190 srcs = [6191 "utils/mlgo-utils/extract_ir.py",6192 "utils/mlgo-utils/mlgo/__init__.py",6193 "utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py",6194 "utils/mlgo-utils/mlgo/corpus/flags.py",6195 ],6196 imports = ["utils/mlgo-utils"],6197)6198 6199py_binary(6200 name = "combine_training_corpus",6201 srcs = [6202 "utils/mlgo-utils/combine_training_corpus.py",6203 "utils/mlgo-utils/mlgo/__init__.py",6204 "utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py",6205 "utils/mlgo-utils/mlgo/corpus/flags.py",6206 ],6207 imports = ["utils/mlgo-utils"],6208)6209 6210py_binary(6211 name = "make_corpus",6212 srcs = [6213 "utils/mlgo-utils/make_corpus.py",6214 "utils/mlgo-utils/mlgo/__init__.py",6215 "utils/mlgo-utils/mlgo/corpus/make_corpus_lib.py",6216 ],6217 imports = ["utils/mlgo-utils"],6218)6219 6220cc_library(6221 name = "TestingADT",6222 testonly = True,6223 hdrs = glob([6224 "include/llvm/Testing/ADT/*.h",6225 ]),6226 copts = llvm_copts,6227 deps = [6228 ":Support",6229 "//third-party/unittest:gmock",6230 ],6231)6232 6233cc_library(6234 name = "TestingDemangle",6235 testonly = True,6236 copts = llvm_copts,6237 textual_hdrs = glob(["include/llvm/Testing/Demangle/*.inc"]),6238)6239 6240cc_library(6241 name = "TestingSupport",6242 testonly = True,6243 srcs = glob([6244 "lib/Testing/Support/*.cpp",6245 ]),6246 hdrs = glob(["include/llvm/Testing/Support/*.h"]),6247 copts = llvm_copts,6248 deps = [6249 ":Support",6250 ":config",6251 "//third-party/unittest:gmock",6252 "//third-party/unittest:gtest",6253 ],6254)6255 6256cc_library(6257 name = "TestingAnnotations",6258 testonly = True,6259 srcs = ["lib/Testing/Annotations/Annotations.cpp"],6260 hdrs = ["include/llvm/Testing/Annotations/Annotations.h"],6261 copts = llvm_copts,6262 deps = [":Support"],6263)6264 6265################################################################################6266# Begin testonly binary utilities6267 6268cc_binary(6269 name = "FileCheck",6270 testonly = True,6271 srcs = glob([6272 "utils/FileCheck/*.cpp",6273 ]),6274 copts = llvm_copts,6275 stamp = 0,6276 deps = [6277 ":FileCheckLib",6278 ":Support",6279 ],6280)6281 6282cc_binary(6283 name = "bugpoint",6284 srcs = glob([6285 "tools/bugpoint/*.cpp",6286 "tools/bugpoint/*.h",6287 ]),6288 copts = llvm_copts,6289 stamp = 0,6290 deps = [6291 ":AllTargetsAsmParsers",6292 ":AllTargetsCodeGens",6293 ":Analysis",6294 ":AsmParser",6295 ":BitReader",6296 ":BitWriter",6297 ":CodeGen",6298 ":Core",6299 ":IPO",6300 ":IRPrinter",6301 ":IRReader",6302 ":Linker",6303 ":Passes",6304 ":Scalar",6305 ":Support",6306 ":TargetParser",6307 ":TransformUtils",6308 ":common_transforms",6309 ":config",6310 ],6311)6312 6313cc_binary(6314 name = "count",6315 testonly = True,6316 srcs = glob([6317 "utils/count/*.c",6318 ]),6319 stamp = 0,6320 deps = [":Support"],6321)6322 6323cc_binary(6324 name = "lli-child-target",6325 testonly = True,6326 srcs = glob([6327 "tools/lli/ChildTarget/*.cpp",6328 ]),6329 copts = llvm_copts,6330 # The tests load code into this binary that expect to see symbols6331 # from libstdc++ such as __cxa_begin_catch and _ZTIi. The latter6332 # isn't even used in the main binary, so we also need to force it6333 # to be included.6334 linkopts = select({6335 "@platforms//os:windows": [],6336 "@platforms//os:macos": [],6337 "//conditions:default": [6338 "-rdynamic",6339 "-u_ZTIi",6340 ],6341 }),6342 stamp = 0,6343 deps = [6344 ":OrcJIT",6345 ":OrcTargetProcess",6346 ":Support",6347 ":attributes_gen",6348 ":config",6349 ":intrinsic_enums_gen",6350 ],6351)6352 6353cc_binary(6354 name = "llvm-c-test",6355 testonly = True,6356 srcs = glob([6357 "tools/llvm-c-test/*.c",6358 "tools/llvm-c-test/*.cpp",6359 "tools/llvm-c-test/*.h",6360 ]),6361 stamp = 0,6362 deps = [6363 ":AllTargetsAsmParsers",6364 ":AllTargetsCodeGens",6365 ":AllTargetsDisassemblers",6366 ":Analysis",6367 ":BitReader",6368 ":BitWriter",6369 ":Core",6370 ":ExecutionEngine",6371 ":IPO",6372 ":IRReader",6373 ":InstCombine",6374 ":LTO",6375 ":Linker",6376 ":MCDisassembler",6377 ":Object",6378 ":OrcJIT",6379 ":Passes",6380 ":Remarks",6381 ":Scalar",6382 ":Support",6383 ":Target",6384 ":TransformUtils",6385 ":Vectorize",6386 ],6387)6388 6389cc_binary(6390 name = "llvm-diff",6391 testonly = True,6392 srcs = glob([6393 "tools/llvm-diff/*.cpp",6394 ]),6395 copts = llvm_copts,6396 stamp = 0,6397 deps = [6398 ":Core",6399 ":Diff",6400 ":IRPrinter",6401 ":IRReader",6402 ":Support",6403 ],6404)6405 6406cc_binary(6407 name = "llvm-isel-fuzzer",6408 testonly = True,6409 srcs = glob([6410 "tools/llvm-isel-fuzzer/*.cpp",6411 ]),6412 copts = llvm_copts,6413 stamp = 0,6414 deps = [6415 ":AllTargetsAsmParsers",6416 ":AllTargetsCodeGens",6417 ":Analysis",6418 ":BitReader",6419 ":BitWriter",6420 ":CodeGen",6421 ":Core",6422 ":FuzzMutate",6423 ":IRPrinter",6424 ":IRReader",6425 ":MC",6426 ":Support",6427 ":Target",6428 ],6429)6430 6431# This is really a Python script, but call it sh_binary to ignore the hyphen in6432# the path, which py_binary does not allow.6433# Also, note: llvm-locstats expects llvm-dwarfdump to be in the same directory6434# when executed.6435sh_binary(6436 name = "llvm-locstats",6437 testonly = True,6438 srcs = glob([6439 "utils/llvm-locstats/*.py",6440 ]),6441 # llvm-locstats is a thin wrapper around llvm-dwarfdump.6442 data = [":llvm-dwarfdump"],6443)6444 6445sh_binary(6446 name = "llvm-original-di-preservation",6447 testonly = True,6448 srcs = ["utils/llvm-original-di-preservation.py"],6449)6450 6451cc_binary(6452 name = "not",6453 testonly = True,6454 srcs = glob([6455 "utils/not/*.cpp",6456 ]),6457 copts = llvm_copts,6458 stamp = 0,6459 deps = [":Support"],6460)6461 6462cc_binary(6463 name = "llvm-opt-fuzzer",6464 testonly = True,6465 srcs = glob([6466 "tools/llvm-opt-fuzzer/*.cpp",6467 ]),6468 copts = llvm_copts,6469 stamp = 0,6470 deps = [6471 ":AllTargetsCodeGens",6472 ":Analysis",6473 ":BitReader",6474 ":BitWriter",6475 ":CodeGen",6476 ":Core",6477 ":Coroutines",6478 ":FuzzMutate",6479 ":MC",6480 ":Passes",6481 ":Support",6482 ":Target",6483 ],6484)6485 6486gentbl_cc_library(6487 name = "ReadTAPIOptsTableGen",6488 strip_include_prefix = "tools/llvm-readtapi",6489 tbl_outs = {"tools/llvm-readtapi/TapiOpts.inc": ["-gen-opt-parser-defs"]},6490 tblgen = ":llvm-tblgen",6491 td_file = "tools/llvm-readtapi/TapiOpts.td",6492 deps = [":OptParserTdFiles"],6493)6494 6495cc_binary(6496 name = "llvm-readtapi",6497 testonly = True,6498 srcs = glob([6499 "tools/llvm-readtapi/*.cpp",6500 "tools/llvm-readtapi/*.h",6501 ]),6502 copts = llvm_copts,6503 stamp = 0,6504 deps = [6505 ":BinaryFormat",6506 ":Object",6507 ":Option",6508 ":ReadTAPIOptsTableGen",6509 ":Support",6510 ":TextAPI",6511 ":TextAPIBinaryReader",6512 ],6513)6514 6515gentbl_cc_library(6516 name = "TLICheckerOptsTableGen",6517 strip_include_prefix = "tools/llvm-tli-checker",6518 tbl_outs = {"tools/llvm-tli-checker/Opts.inc": ["-gen-opt-parser-defs"]},6519 tblgen = ":llvm-tblgen",6520 td_file = "tools/llvm-tli-checker/Opts.td",6521 deps = [":OptParserTdFiles"],6522)6523 6524cc_binary(6525 name = "llvm-tli-checker",6526 testonly = True,6527 srcs = glob([6528 "tools/llvm-tli-checker/*.cpp",6529 ]),6530 copts = llvm_copts,6531 stamp = 0,6532 deps = [6533 ":Analysis",6534 ":BinaryFormat",6535 ":BitReader",6536 ":BitstreamReader",6537 ":Core",6538 ":Demangle",6539 ":MC",6540 ":MCParser",6541 ":Object",6542 ":Option",6543 ":Remarks",6544 ":Support",6545 ":TLICheckerOptsTableGen",6546 ":TargetParser",6547 ":TextAPI",6548 ":config",6549 ],6550)6551 6552cc_binary(6553 name = "llvm-sim",6554 testonly = True,6555 srcs = glob([6556 "tools/llvm-sim/*.cpp",6557 ]),6558 copts = llvm_copts,6559 stamp = 0,6560 deps = [6561 ":Analysis",6562 ":Core",6563 ":IRReader",6564 ":Support",6565 ":config",6566 ],6567)6568 6569cc_binary(6570 name = "llvm-ir2vec",6571 testonly = True,6572 srcs = glob([6573 "tools/llvm-ir2vec/*.cpp",6574 ]),6575 copts = llvm_copts,6576 stamp = 0,6577 deps = [6578 ":AllTargetsAsmParsers",6579 ":AllTargetsCodeGens",6580 ":AllTargetsMCAs",6581 ":Analysis",6582 ":CodeGen",6583 ":Core",6584 ":IRReader",6585 ":MC",6586 ":Support",6587 ":Target",6588 ":TargetParser",6589 ":config",6590 ],6591)6592 6593cc_binary(6594 name = "llvm-ctxprof-util",6595 testonly = True,6596 srcs = glob([6597 "tools/llvm-ctxprof-util/*.cpp",6598 ]),6599 copts = llvm_copts,6600 stamp = 0,6601 deps = [6602 ":Core",6603 ":Object",6604 ":ProfileData",6605 ":Support",6606 ":config",6607 ],6608)6609 6610cc_binary(6611 name = "obj2yaml",6612 testonly = True,6613 srcs = glob([6614 "tools/obj2yaml/*.cpp",6615 "tools/obj2yaml/*.h",6616 ]),6617 copts = llvm_copts,6618 stamp = 0,6619 deps = [6620 ":BinaryFormat",6621 ":DebugInfoCodeView",6622 ":DebugInfoDWARF",6623 ":Object",6624 ":ObjectYAML",6625 ":Support",6626 ],6627)6628 6629cc_binary(6630 name = "verify-uselistorder",6631 srcs = glob([6632 "tools/verify-uselistorder/*.cpp",6633 ]),6634 copts = llvm_copts,6635 stamp = 0,6636 deps = [6637 ":AsmParser",6638 ":BitReader",6639 ":BitWriter",6640 ":Core",6641 ":IRPrinter",6642 ":IRReader",6643 ":Support",6644 ],6645)6646 6647cc_binary(6648 name = "yaml2obj",6649 testonly = True,6650 srcs = glob([6651 "tools/yaml2obj/*.cpp",6652 ]),6653 copts = llvm_copts,6654 stamp = 0,6655 deps = [6656 ":BinaryFormat",6657 ":DebugInfoCodeView",6658 ":MC",6659 ":Object",6660 ":ObjectYAML",6661 ":Support",6662 ],6663)6664 6665cc_binary(6666 name = "yaml-bench",6667 testonly = True,6668 srcs = glob([6669 "utils/yaml-bench/*.cpp",6670 ]),6671 copts = llvm_copts,6672 stamp = 0,6673 deps = [6674 ":Support",6675 ],6676)6677