1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 load("//mlir:tblgen.bzl", "gentbl_cc_library")
8 default_visibility = ["//visibility:public"],
9 features = ["layering_check"],
28 "//llvm:TestingSupport",
30 "//third-party/unittest:gmock",
31 "//third-party/unittest:gtest",
32 "//third-party/unittest:gtest_main",
37 name = "analysis_tests",
43 # TODO: Add this file to the build.
44 "Analysis/ConstraintSystemTest.cpp",
45 "Analysis/TFUtilsTest.cpp",
46 "Analysis/TrainingLoggerTest.cpp",
47 "Analysis/MLModelRunnerTest.cpp",
55 "//llvm:Instrumentation",
58 "//llvm:TargetParser",
59 "//llvm:TestingSupport",
60 "//llvm:TransformUtils",
61 "//llvm:attributes_gen",
63 "//third-party/unittest:gmock",
64 "//third-party/unittest:gtest",
65 "//third-party/unittest:gtest_main",
70 name = "asm_parser_tests",
80 "//third-party/unittest:gtest",
81 "//third-party/unittest:gtest_main",
86 name = "bitcode_tests",
101 "//third-party/unittest:gtest",
102 "//third-party/unittest:gtest_main",
107 name = "bitstream_tests",
114 "//llvm:BitstreamReader",
115 "//llvm:BitstreamWriter",
117 "//llvm:TestingSupport",
118 "//third-party/unittest:gmock",
119 "//third-party/unittest:gtest",
120 "//third-party/unittest:gtest_main",
125 name = "cgdata_tests",
136 "//third-party/unittest:gmock",
137 "//third-party/unittest:gtest",
138 "//third-party/unittest:gtest_main",
143 name = "codegen_tests_includes",
151 name = "codegen_tests",
160 features = ["-layering_check"], # #include "../lib/CodeGen/AllocationOrder.h"
162 ":codegen_tests_includes",
163 "//llvm:AllTargetsAsmParsers",
164 "//llvm:AllTargetsCodeGens",
167 "//llvm:BinaryFormat",
169 "//llvm:CodeGenTypes",
175 "//llvm:TestingSupport",
176 "//third-party/unittest:gtest",
177 "//third-party/unittest:gtest_main",
182 name = "codegen_globalisel_tests",
186 "CodeGen/GlobalISel/*.cpp",
187 "CodeGen/GlobalISel/*.h",
192 "$(STACK_FRAME_UNLIMITED)",
195 "//llvm:AllTargetsAsmParsers",
196 "//llvm:AllTargetsCodeGens",
199 "//llvm:CodeGenTypes",
201 "//llvm:FileCheckLib",
205 "//third-party/unittest:gtest",
206 "//third-party/unittest:gtest_main",
211 name = "debuginfo_tests",
215 "DebugInfo/DWARF/*.cpp",
216 "DebugInfo/DWARF/*.h",
217 # TODO: Re-enable these when they stop crashing.
218 #"DebugInfo/PDB/*.cpp",
219 #"DebugInfo/PDB/*.h",
224 # Skip a test that relies on reading files in a way that doesn't easily
226 "--gtest_filter=-NativeSymbolReuseTest.*",
227 # TODO: this test is failing on some configs, investigate and re-enable it.
228 "--gtest_filter=-DebugLineBasicFixture.LookupAddressRangeWithStmtSequenceOffset",
230 features = ["-layering_check"], # #include "../lib/CodeGen/AsmPrinter/DwarfStringPool.h"
232 "//llvm:AllTargetsAsmParsers",
233 "//llvm:AllTargetsCodeGens",
234 "//llvm:BinaryFormat",
235 "//llvm:CodeGenTypes",
238 "//llvm:DebugInfoDWARF",
239 "//llvm:DebugInfoPDB",
245 "//llvm:TestingSupport",
247 "//third-party/unittest:gtest",
248 "//third-party/unittest:gtest_main",
253 name = "debuginfod_tests",
254 srcs = glob(["Debuginfod/*.cpp"]),
258 "//llvm:TestingSupport",
259 "//third-party/unittest:gmock",
260 "//third-party/unittest:gtest",
261 "//third-party/unittest:gtest_main",
266 name = "execution_engine_tests",
269 ["ExecutionEngine/*.cpp"],
273 "//llvm:AllTargetsCodeGens",
276 "//llvm:ExecutionEngine",
277 "//llvm:Interpreter",
279 "//third-party/unittest:gtest",
280 "//third-party/unittest:gtest_main",
285 name = "execution_engine_mcjit_tests",
289 "ExecutionEngine/MCJIT/*.cpp",
290 "ExecutionEngine/MCJIT/*.h",
295 "$(STACK_FRAME_UNLIMITED)",
298 "//llvm:AllTargetsCodeGens",
302 "//llvm:ExecutionEngine",
308 "//llvm:TargetParser",
310 "//third-party/unittest:gtest",
311 "//third-party/unittest:gtest_main",
316 name = "execution_engine_orc_tests",
320 "ExecutionEngine/Orc/*.cpp",
321 "ExecutionEngine/Orc/*.h",
327 "--gtest_filter=-ObjectLinkingLayerTest.TestSetProcessAllSections",
330 "@platforms//os:macos": [],
331 "@platforms//os:windows": [],
332 "//conditions:default": [
333 "-Wl,--export-dynamic-symbol=llvm_orc_registerJITLoaderGDBWrapper",
337 "//llvm:AllTargetsAsmParsers",
338 "//llvm:AllTargetsCodeGens",
341 "//llvm:BinaryFormat",
343 "//llvm:ExecutionEngine",
348 "//llvm:OrcDebugging",
351 "//llvm:OrcTargetProcess",
353 "//llvm:TargetParser",
354 "//llvm:TestingSupport",
356 "//third-party/unittest:gtest",
357 "//third-party/unittest:gtest_main",
362 name = "filecheck_tests",
368 features = ["-layering_check"], # #include "../lib/FileCheck/FileCheckImpl.h"
370 "//llvm:FileCheckLib",
372 "//llvm:TestingSupport",
373 "//third-party/unittest:gtest",
374 "//third-party/unittest:gtest_main",
381 timeout = "long", # ConstantRangeTest cases may take several seconds each.
389 "Support/KnownBitsTest.h",
391 features = ["-layering_check"],
396 "//llvm:BinaryFormat",
402 "//llvm:TargetParser",
403 "//llvm:TestingSupport",
404 "//llvm:TransformUtils",
406 "//third-party/unittest:gmock",
407 "//third-party/unittest:gtest",
408 "//third-party/unittest:gtest_main",
413 name = "line_editor_tests",
416 ["LineEditor/*.cpp"],
422 "//third-party/unittest:gtest",
423 "//third-party/unittest:gtest_main",
428 name = "frontend_tests",
437 "//llvm:FrontendOpenACC",
438 "//llvm:FrontendOpenMP",
441 "//llvm:TargetParser",
442 "//llvm:TestingSupport",
443 "//llvm:TransformUtils",
444 "//third-party/unittest:gmock",
445 "//third-party/unittest:gtest",
446 "//third-party/unittest:gtest_main",
451 name = "linker_tests",
462 "//third-party/unittest:gtest",
463 "//third-party/unittest:gtest_main",
475 "//llvm:AllTargetsCodeGens",
476 "//llvm:AllTargetsDisassemblers",
477 "//llvm:BinaryFormat",
479 "//llvm:MCDisassembler",
483 "//third-party/unittest:gtest",
484 "//third-party/unittest:gtest_main",
495 features = ["-layering_check"], # #include "../lib/CodeGen/RegisterCoalescer.h"
497 "//llvm:AllTargetsAsmParsers",
498 "//llvm:AllTargetsCodeGens",
500 "//llvm:CodeGenTypes",
505 "//third-party/unittest:gtest",
506 "//third-party/unittest:gtest_main",
511 name = "objcopy_tests",
521 "//llvm:TestingSupport",
522 "//third-party/unittest:gtest",
523 "//third-party/unittest:gtest_main",
528 name = "object_tests",
535 "//llvm:BinaryFormat",
539 "//llvm:TargetParser",
540 "//llvm:TestingSupport",
541 "//third-party/unittest:gmock",
542 "//third-party/unittest:gtest",
543 "//third-party/unittest:gtest_main",
548 name = "object_yaml_tests",
551 ["ObjectYAML/*.cpp"],
555 "//llvm:DebugInfoCodeView",
559 "//llvm:TestingSupport",
560 "//third-party/unittest:gtest",
561 "//third-party/unittest:gtest_main",
566 name = "option_tests_gen",
567 strip_include_prefix = "Option",
569 ["-gen-opt-parser-defs"],
572 tblgen = "//llvm:llvm-tblgen",
573 td_file = "Option/Opts.td",
574 deps = ["//llvm:OptParserTdFiles"],
578 name = "automata_gen",
579 strip_include_prefix = "TableGen",
583 "TableGen/AutomataAutomata.inc",
586 ["-gen-searchable-tables"],
587 "TableGen/AutomataTables.inc",
590 tblgen = "//llvm:llvm-tblgen",
591 td_file = "TableGen/Automata.td",
592 deps = ["//llvm:CommonTargetTdFiles"],
596 name = "option_tests",
606 "//third-party/unittest:gtest",
607 "//third-party/unittest:gtest_main",
612 name = "remarks_tests",
622 "//llvm:remark_linker",
623 "//third-party/unittest:gtest",
624 "//third-party/unittest:gtest_main",
629 name = "sandboxir_tests",
641 "//third-party/unittest:gmock",
642 "//third-party/unittest:gtest",
647 name = "profile_data_tests",
650 ["ProfileData/*.cpp"],
659 "//llvm:ProfileData",
662 "//llvm:TestingSupport",
663 "//third-party/unittest:gmock",
664 "//third-party/unittest:gtest",
665 "//third-party/unittest:gtest_main",
669 # Note that the name of this test is important as it is used in the test itself.
671 name = "SupportTests",
680 "Support/ParallelTest.cpp",
685 "--gtest_filter=-ProgramTest.CreateProcessTrailingSlash",
688 "$(STACK_FRAME_UNLIMITED)",
692 "no-sandbox", # FileSystemTest.permissions not compatible with the sandbox on MacOS
695 "//llvm:AllTargetsCodeGens",
696 "//llvm:BinaryFormat",
698 "//llvm:ProfileData",
700 "//llvm:TargetParser",
701 "//llvm:TestingSupport",
703 "//third-party/unittest:gmock",
704 "//third-party/unittest:gtest",
705 "//third-party/unittest:gtest_main",
710 name = "support_parallel_tests",
712 srcs = ["Support/ParallelTest.cpp"],
714 "$(STACK_FRAME_UNLIMITED)",
718 "//llvm:AllTargetsCodeGens",
721 "//third-party/unittest:gtest",
722 "//third-party/unittest:gtest_main",
727 name = "tablegen_tests",
739 "//llvm:TableGenGlobalISel",
740 "//third-party/unittest:gmock",
741 "//third-party/unittest:gtest",
742 "//third-party/unittest:gtest_main",
747 name = "target_aarch64_tests",
750 ["Target/AArch64/*.cpp"],
754 "$(STACK_FRAME_UNLIMITED)",
756 features = ["-layering_check"], # #include "AArch64GenInstrInfo.inc"
758 "//llvm:AArch64CodeGen",
759 "//llvm:AArch64UtilsAndDesc",
762 "//llvm:CodeGenTypes",
767 "//third-party/unittest:gtest",
768 "//third-party/unittest:gtest_main",
773 name = "testing_adt_tests",
784 "//third-party/unittest:gtest",
785 "//third-party/unittest:gtest_main",
790 name = "transforms_tests",
794 "Transforms/IPO/*.cpp",
795 "Transforms/IPO/*.h",
796 "Transforms/Utils/*.cpp",
807 "//llvm:ProfileData",
809 "//llvm:TestingSupport",
810 "//llvm:TransformUtils",
812 "//third-party/unittest:gmock",
813 "//third-party/unittest:gtest",
814 "//third-party/unittest:gtest_main",
819 name = "llvm_exegesis_tests",
823 "tools/llvm-exegesis/*.cpp",
824 "tools/llvm-exegesis/X86/*.cpp",
825 "tools/llvm-exegesis/X86/*.h",
829 "tools/llvm-exegesis/Common/AssemblerUtils.h",
831 includes = ["tools/llvm-exegesis"],
833 "//llvm:AllTargetsCodeGens",
834 "//llvm:AllTargetsDisassemblers",
836 "//llvm:CodeGenTypes",
839 "//llvm:MCDisassembler",
841 "//llvm:TargetParser",
842 "//llvm:TestingSupport",
844 "//llvm:X86UtilsAndDesc",
845 "//third-party/unittest:gmock",
846 "//third-party/unittest:gtest",
847 "//third-party/unittest:gtest_main",
852 name = "llvm_mca_tests",
856 "tools/llvm-mca/*.cpp",
857 "tools/llvm-mca/*.h",
858 "tools/llvm-mca/X86/*.cpp",
859 "tools/llvm-mca/X86/*.h",
863 includes = ["tools/llvm-mca"],
867 "//llvm:MCAApplication",
869 "//llvm:TargetParser",
871 "//llvm:X86UtilsAndDesc",
872 "//third-party/unittest:gtest",
873 "//third-party/unittest:gtest_main",