Revert "Remove dependence on <ciso646>" (#126399)
[llvm-project.git] / utils / bazel / llvm-project-overlay / llvm / unittests / BUILD.bazel
blob61f4700b057abefef342bc12f1615aca38be1373
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")
7 package(
8     default_visibility = ["//visibility:public"],
9     features = ["layering_check"],
12 licenses(["notice"])
14 cc_test(
15     name = "adt_tests",
16     size = "medium",
17     srcs = glob(
18         [
19             "ADT/*.cpp",
20             "ADT/*.h",
21         ],
22         allow_empty = False,
23     ),
24     shard_count = 20,
25     deps = [
26         "//llvm:Core",
27         "//llvm:Support",
28         "//llvm:TestingSupport",
29         "//llvm:config",
30         "//third-party/unittest:gmock",
31         "//third-party/unittest:gtest",
32         "//third-party/unittest:gtest_main",
33     ],
36 cc_test(
37     name = "analysis_tests",
38     size = "small",
39     srcs = glob(
40         ["Analysis/*.cpp"],
41         allow_empty = False,
42         exclude = [
43             # TODO: Add this file to the build.
44             "Analysis/ConstraintSystemTest.cpp",
45             "Analysis/TFUtilsTest.cpp",
46             "Analysis/TrainingLoggerTest.cpp",
47             "Analysis/MLModelRunnerTest.cpp",
48         ],
49     ),
50     deps = [
51         "//llvm:Analysis",
52         "//llvm:AsmParser",
53         "//llvm:CodeGen",
54         "//llvm:Core",
55         "//llvm:Instrumentation",
56         "//llvm:Passes",
57         "//llvm:Support",
58         "//llvm:TargetParser",
59         "//llvm:TestingSupport",
60         "//llvm:TransformUtils",
61         "//llvm:attributes_gen",
62         "//llvm:config",
63         "//third-party/unittest:gmock",
64         "//third-party/unittest:gtest",
65         "//third-party/unittest:gtest_main",
66     ],
69 cc_test(
70     name = "asm_parser_tests",
71     size = "small",
72     srcs = glob(
73         ["AsmParser/*.cpp"],
74         allow_empty = False,
75     ),
76     deps = [
77         "//llvm:AsmParser",
78         "//llvm:Core",
79         "//llvm:Support",
80         "//third-party/unittest:gtest",
81         "//third-party/unittest:gtest_main",
82     ],
85 cc_test(
86     name = "bitcode_tests",
87     size = "small",
88     srcs = glob(
89         [
90             "Bitcode/*.cpp",
91             "Bitcode/*.h",
92         ],
93         allow_empty = False,
94     ),
95     deps = [
96         "//llvm:AsmParser",
97         "//llvm:BitReader",
98         "//llvm:BitWriter",
99         "//llvm:Core",
100         "//llvm:Support",
101         "//third-party/unittest:gtest",
102         "//third-party/unittest:gtest_main",
103     ],
106 cc_test(
107     name = "bitstream_tests",
108     size = "small",
109     srcs = glob(
110         ["Bitstream/*.cpp"],
111         allow_empty = False,
112     ),
113     deps = [
114         "//llvm:BitstreamReader",
115         "//llvm:BitstreamWriter",
116         "//llvm:Support",
117         "//llvm:TestingSupport",
118         "//third-party/unittest:gmock",
119         "//third-party/unittest:gtest",
120         "//third-party/unittest:gtest_main",
121     ],
124 cc_test(
125     name = "cgdata_tests",
126     size = "small",
127     srcs = glob(
128         ["CGData/*.cpp"],
129         allow_empty = False,
130     ),
131     deps = [
132         "//llvm:CGData",
133         "//llvm:CodeGen",
134         "//llvm:Core",
135         "//llvm:Support",
136         "//third-party/unittest:gmock",
137         "//third-party/unittest:gtest",
138         "//third-party/unittest:gtest_main",
139     ],
142 cc_library(
143     name = "codegen_tests_includes",
144     textual_hdrs = glob(
145         ["CodeGen/*.inc"],
146         allow_empty = False,
147     ),
150 cc_test(
151     name = "codegen_tests",
152     size = "medium",
153     srcs = glob(
154         [
155             "CodeGen/*.cpp",
156             "CodeGen/*.h",
157         ],
158         allow_empty = False,
159     ),
160     features = ["-layering_check"],  # #include "../lib/CodeGen/AllocationOrder.h"
161     deps = [
162         ":codegen_tests_includes",
163         "//llvm:AllTargetsAsmParsers",
164         "//llvm:AllTargetsCodeGens",
165         "//llvm:Analysis",
166         "//llvm:AsmParser",
167         "//llvm:BinaryFormat",
168         "//llvm:CodeGen",
169         "//llvm:CodeGenTypes",
170         "//llvm:Core",
171         "//llvm:MC",
172         "//llvm:Passes",
173         "//llvm:Support",
174         "//llvm:Target",
175         "//llvm:TestingSupport",
176         "//third-party/unittest:gtest",
177         "//third-party/unittest:gtest_main",
178     ],
181 cc_test(
182     name = "codegen_globalisel_tests",
183     size = "small",
184     srcs = glob(
185         [
186             "CodeGen/GlobalISel/*.cpp",
187             "CodeGen/GlobalISel/*.h",
188         ],
189         allow_empty = False,
190     ),
191     copts = [
192         "$(STACK_FRAME_UNLIMITED)",
193     ],
194     deps = [
195         "//llvm:AllTargetsAsmParsers",
196         "//llvm:AllTargetsCodeGens",
197         "//llvm:AsmParser",
198         "//llvm:CodeGen",
199         "//llvm:CodeGenTypes",
200         "//llvm:Core",
201         "//llvm:FileCheckLib",
202         "//llvm:MC",
203         "//llvm:Support",
204         "//llvm:Target",
205         "//third-party/unittest:gtest",
206         "//third-party/unittest:gtest_main",
207     ],
210 cc_test(
211     name = "debuginfo_tests",
212     size = "medium",
213     srcs = glob(
214         [
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",
220         ],
221         allow_empty = False,
222     ),
223     args = [
224         # Skip a test that relies on reading files in a way that doesn't easily
225         # work with Bazel.
226         "--gtest_filter=-NativeSymbolReuseTest.*",
227         # TODO: this test is failing on some configs, investigate and re-enable it.
228         "--gtest_filter=-DebugLineBasicFixture.LookupAddressRangeWithStmtSequenceOffset",
229     ],
230     features = ["-layering_check"],  # #include "../lib/CodeGen/AsmPrinter/DwarfStringPool.h"
231     deps = [
232         "//llvm:AllTargetsAsmParsers",
233         "//llvm:AllTargetsCodeGens",
234         "//llvm:BinaryFormat",
235         "//llvm:CodeGenTypes",
236         "//llvm:Core",
237         "//llvm:DebugInfo",
238         "//llvm:DebugInfoDWARF",
239         "//llvm:DebugInfoPDB",
240         "//llvm:MC",
241         "//llvm:Object",
242         "//llvm:ObjectYAML",
243         "//llvm:Support",
244         "//llvm:Target",
245         "//llvm:TestingSupport",
246         "//llvm:config",
247         "//third-party/unittest:gtest",
248         "//third-party/unittest:gtest_main",
249     ],
252 cc_test(
253     name = "debuginfod_tests",
254     srcs = glob(["Debuginfod/*.cpp"]),
255     deps = [
256         "//llvm:Debuginfod",
257         "//llvm:Support",
258         "//llvm:TestingSupport",
259         "//third-party/unittest:gmock",
260         "//third-party/unittest:gtest",
261         "//third-party/unittest:gtest_main",
262     ],
265 cc_test(
266     name = "execution_engine_tests",
267     size = "small",
268     srcs = glob(
269         ["ExecutionEngine/*.cpp"],
270         allow_empty = False,
271     ),
272     deps = [
273         "//llvm:AllTargetsCodeGens",
274         "//llvm:AsmParser",
275         "//llvm:Core",
276         "//llvm:ExecutionEngine",
277         "//llvm:Interpreter",
278         "//llvm:Support",
279         "//third-party/unittest:gtest",
280         "//third-party/unittest:gtest_main",
281     ],
284 cc_test(
285     name = "execution_engine_mcjit_tests",
286     size = "medium",
287     srcs = glob(
288         [
289             "ExecutionEngine/MCJIT/*.cpp",
290             "ExecutionEngine/MCJIT/*.h",
291         ],
292         allow_empty = False,
293     ),
294     copts = [
295         "$(STACK_FRAME_UNLIMITED)",
296     ],
297     deps = [
298         "//llvm:AllTargetsCodeGens",
299         "//llvm:Analysis",
300         "//llvm:AsmParser",
301         "//llvm:Core",
302         "//llvm:ExecutionEngine",
303         "//llvm:MC",
304         "//llvm:MCJIT",
305         "//llvm:Passes",
306         "//llvm:Support",
307         "//llvm:Target",
308         "//llvm:TargetParser",
309         "//llvm:config",
310         "//third-party/unittest:gtest",
311         "//third-party/unittest:gtest_main",
312     ],
315 cc_test(
316     name = "execution_engine_orc_tests",
317     size = "medium",
318     srcs = glob(
319         [
320             "ExecutionEngine/Orc/*.cpp",
321             "ExecutionEngine/Orc/*.h",
322         ],
323         allow_empty = False,
324     ),
325     args = [
326         # keep one-per-line
327         "--gtest_filter=-ObjectLinkingLayerTest.TestSetProcessAllSections",
328     ],
329     linkopts = select({
330         "@platforms//os:macos": [],
331         "@platforms//os:windows": [],
332         "//conditions:default": [
333             "-Wl,--export-dynamic-symbol=llvm_orc_registerJITLoaderGDBWrapper",
334         ],
335     }),
336     deps = [
337         "//llvm:AllTargetsAsmParsers",
338         "//llvm:AllTargetsCodeGens",
339         "//llvm:Analysis",
340         "//llvm:AsmParser",
341         "//llvm:BinaryFormat",
342         "//llvm:Core",
343         "//llvm:ExecutionEngine",
344         "//llvm:IRReader",
345         "//llvm:JITLink",
346         "//llvm:MC",
347         "//llvm:Object",
348         "//llvm:OrcDebugging",
349         "//llvm:OrcJIT",
350         "//llvm:OrcShared",
351         "//llvm:OrcTargetProcess",
352         "//llvm:Support",
353         "//llvm:TargetParser",
354         "//llvm:TestingSupport",
355         "//llvm:config",
356         "//third-party/unittest:gtest",
357         "//third-party/unittest:gtest_main",
358     ],
361 cc_test(
362     name = "filecheck_tests",
363     size = "small",
364     srcs = glob(
365         ["FileCheck/*.cpp"],
366         allow_empty = False,
367     ),
368     features = ["-layering_check"],  # #include "../lib/FileCheck/FileCheckImpl.h"
369     deps = [
370         "//llvm:FileCheckLib",
371         "//llvm:Support",
372         "//llvm:TestingSupport",
373         "//third-party/unittest:gtest",
374         "//third-party/unittest:gtest_main",
375     ],
378 cc_test(
379     name = "ir_tests",
380     size = "medium",
381     timeout = "long",  # ConstantRangeTest cases may take several seconds each.
382     srcs = glob(
383         [
384             "IR/*.cpp",
385             "IR/*.h",
386         ],
387         allow_empty = False,
388     ) + [
389         "Support/KnownBitsTest.h",
390     ],
391     features = ["-layering_check"],
392     shard_count = 20,
393     deps = [
394         "//llvm:Analysis",
395         "//llvm:AsmParser",
396         "//llvm:BinaryFormat",
397         "//llvm:CodeGen",
398         "//llvm:Core",
399         "//llvm:Passes",
400         "//llvm:Scalar",
401         "//llvm:Support",
402         "//llvm:TargetParser",
403         "//llvm:TestingSupport",
404         "//llvm:TransformUtils",
405         "//llvm:config",
406         "//third-party/unittest:gmock",
407         "//third-party/unittest:gtest",
408         "//third-party/unittest:gtest_main",
409     ],
412 cc_test(
413     name = "line_editor_tests",
414     size = "small",
415     srcs = glob(
416         ["LineEditor/*.cpp"],
417         allow_empty = False,
418     ),
419     deps = [
420         "//llvm:LineEditor",
421         "//llvm:Support",
422         "//third-party/unittest:gtest",
423         "//third-party/unittest:gtest_main",
424     ],
427 cc_test(
428     name = "frontend_tests",
429     size = "small",
430     srcs = glob(
431         ["Frontend/*.cpp"],
432         allow_empty = False,
433     ),
434     deps = [
435         "//llvm:Analysis",
436         "//llvm:Core",
437         "//llvm:FrontendOpenACC",
438         "//llvm:FrontendOpenMP",
439         "//llvm:Passes",
440         "//llvm:Support",
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",
447     ],
450 cc_test(
451     name = "linker_tests",
452     size = "small",
453     srcs = glob(
454         ["Linker/*.cpp"],
455         allow_empty = False,
456     ),
457     deps = [
458         "//llvm:AsmParser",
459         "//llvm:Core",
460         "//llvm:Linker",
461         "//llvm:Support",
462         "//third-party/unittest:gtest",
463         "//third-party/unittest:gtest_main",
464     ],
467 cc_test(
468     name = "mc_tests",
469     size = "small",
470     srcs = glob(
471         ["MC/*.cpp"],
472         allow_empty = False,
473     ),
474     deps = [
475         "//llvm:AllTargetsCodeGens",
476         "//llvm:AllTargetsDisassemblers",
477         "//llvm:BinaryFormat",
478         "//llvm:MC",
479         "//llvm:MCDisassembler",
480         "//llvm:Object",
481         "//llvm:Support",
482         "//llvm:Target",
483         "//third-party/unittest:gtest",
484         "//third-party/unittest:gtest_main",
485     ],
488 cc_test(
489     name = "mi_tests",
490     size = "medium",
491     srcs = glob(
492         ["MI/*.cpp"],
493         allow_empty = False,
494     ),
495     features = ["-layering_check"],  # #include "../lib/CodeGen/RegisterCoalescer.h"
496     deps = [
497         "//llvm:AllTargetsAsmParsers",
498         "//llvm:AllTargetsCodeGens",
499         "//llvm:CodeGen",
500         "//llvm:CodeGenTypes",
501         "//llvm:Core",
502         "//llvm:MC",
503         "//llvm:Support",
504         "//llvm:Target",
505         "//third-party/unittest:gtest",
506         "//third-party/unittest:gtest_main",
507     ],
510 cc_test(
511     name = "objcopy_tests",
512     srcs = glob(
513         ["ObjCopy/*.cpp"],
514         allow_empty = False,
515     ),
516     deps = [
517         "//llvm:ObjCopy",
518         "//llvm:Object",
519         "//llvm:ObjectYAML",
520         "//llvm:Support",
521         "//llvm:TestingSupport",
522         "//third-party/unittest:gtest",
523         "//third-party/unittest:gtest_main",
524     ],
527 cc_test(
528     name = "object_tests",
529     size = "small",
530     srcs = glob(
531         ["Object/*.cpp"],
532         allow_empty = False,
533     ),
534     deps = [
535         "//llvm:BinaryFormat",
536         "//llvm:Object",
537         "//llvm:ObjectYAML",
538         "//llvm:Support",
539         "//llvm:TargetParser",
540         "//llvm:TestingSupport",
541         "//third-party/unittest:gmock",
542         "//third-party/unittest:gtest",
543         "//third-party/unittest:gtest_main",
544     ],
547 cc_test(
548     name = "object_yaml_tests",
549     size = "small",
550     srcs = glob(
551         ["ObjectYAML/*.cpp"],
552         allow_empty = False,
553     ),
554     deps = [
555         "//llvm:DebugInfoCodeView",
556         "//llvm:Object",
557         "//llvm:ObjectYAML",
558         "//llvm:Support",
559         "//llvm:TestingSupport",
560         "//third-party/unittest:gtest",
561         "//third-party/unittest:gtest_main",
562     ],
565 gentbl_cc_library(
566     name = "option_tests_gen",
567     strip_include_prefix = "Option",
568     tbl_outs = [(
569         ["-gen-opt-parser-defs"],
570         "Option/Opts.inc",
571     )],
572     tblgen = "//llvm:llvm-tblgen",
573     td_file = "Option/Opts.td",
574     deps = ["//llvm:OptParserTdFiles"],
577 gentbl_cc_library(
578     name = "automata_gen",
579     strip_include_prefix = "TableGen",
580     tbl_outs = [
581         (
582             ["-gen-automata"],
583             "TableGen/AutomataAutomata.inc",
584         ),
585         (
586             ["-gen-searchable-tables"],
587             "TableGen/AutomataTables.inc",
588         ),
589     ],
590     tblgen = "//llvm:llvm-tblgen",
591     td_file = "TableGen/Automata.td",
592     deps = ["//llvm:CommonTargetTdFiles"],
595 cc_test(
596     name = "option_tests",
597     size = "small",
598     srcs = glob(
599         ["Option/*.cpp"],
600         allow_empty = False,
601     ),
602     deps = [
603         ":option_tests_gen",
604         "//llvm:Option",
605         "//llvm:Support",
606         "//third-party/unittest:gtest",
607         "//third-party/unittest:gtest_main",
608     ],
611 cc_test(
612     name = "remarks_tests",
613     size = "small",
614     srcs = glob(
615         ["Remarks/*.cpp"],
616         allow_empty = False,
617     ),
618     deps = [
619         "//llvm:BitReader",
620         "//llvm:Remarks",
621         "//llvm:Support",
622         "//llvm:remark_linker",
623         "//third-party/unittest:gtest",
624         "//third-party/unittest:gtest_main",
625     ],
628 cc_test(
629     name = "sandboxir_tests",
630     size = "small",
631     srcs = glob(
632         ["SandboxIR/*.cpp"],
633         allow_empty = False,
634     ),
635     deps = [
636         "//llvm:Analysis",
637         "//llvm:AsmParser",
638         "//llvm:Core",
639         "//llvm:SandboxIR",
640         "//llvm:Support",
641         "//third-party/unittest:gmock",
642         "//third-party/unittest:gtest",
643     ],
646 cc_test(
647     name = "profile_data_tests",
648     size = "small",
649     srcs = glob(
650         ["ProfileData/*.cpp"],
651         allow_empty = False,
652     ),
653     deps = [
654         "//llvm:BitReader",
655         "//llvm:Core",
656         "//llvm:Coverage",
657         "//llvm:DebugInfo",
658         "//llvm:Object",
659         "//llvm:ProfileData",
660         "//llvm:Support",
661         "//llvm:Symbolize",
662         "//llvm:TestingSupport",
663         "//third-party/unittest:gmock",
664         "//third-party/unittest:gtest",
665         "//third-party/unittest:gtest_main",
666     ],
669 # Note that the name of this test is important as it is used in the test itself.
670 cc_test(
671     name = "SupportTests",
672     size = "medium",
673     srcs = glob(
674         [
675             "Support/*.cpp",
676             "Support/*.h",
677         ],
678         allow_empty = False,
679         exclude = [
680             "Support/ParallelTest.cpp",
681         ],
682     ),
683     args = [
684         # keep one-per-line
685         "--gtest_filter=-ProgramTest.CreateProcessTrailingSlash",
686     ],
687     copts = [
688         "$(STACK_FRAME_UNLIMITED)",
689     ],
690     linkstatic = 1,
691     tags = [
692         "no-sandbox",  # FileSystemTest.permissions not compatible with the sandbox on MacOS
693     ],
694     deps = [
695         "//llvm:AllTargetsCodeGens",
696         "//llvm:BinaryFormat",
697         "//llvm:Core",
698         "//llvm:ProfileData",
699         "//llvm:Support",
700         "//llvm:TargetParser",
701         "//llvm:TestingSupport",
702         "//llvm:config",
703         "//third-party/unittest:gmock",
704         "//third-party/unittest:gtest",
705         "//third-party/unittest:gtest_main",
706     ],
709 cc_test(
710     name = "support_parallel_tests",
711     size = "small",
712     srcs = ["Support/ParallelTest.cpp"],
713     copts = [
714         "$(STACK_FRAME_UNLIMITED)",
715     ],
716     linkstatic = 1,
717     deps = [
718         "//llvm:AllTargetsCodeGens",
719         "//llvm:Support",
720         "//llvm:config",
721         "//third-party/unittest:gtest",
722         "//third-party/unittest:gtest_main",
723     ],
726 cc_test(
727     name = "tablegen_tests",
728     size = "small",
729     srcs = glob(
730         [
731             "TableGen/*.cpp",
732         ],
733         allow_empty = False,
734     ),
735     deps = [
736         ":automata_gen",
737         "//llvm:Support",
738         "//llvm:TableGen",
739         "//llvm:TableGenGlobalISel",
740         "//third-party/unittest:gmock",
741         "//third-party/unittest:gtest",
742         "//third-party/unittest:gtest_main",
743     ],
746 cc_test(
747     name = "target_aarch64_tests",
748     size = "small",
749     srcs = glob(
750         ["Target/AArch64/*.cpp"],
751         allow_empty = False,
752     ),
753     copts = [
754         "$(STACK_FRAME_UNLIMITED)",
755     ],
756     features = ["-layering_check"],  # #include "AArch64GenInstrInfo.inc"
757     deps = [
758         "//llvm:AArch64CodeGen",
759         "//llvm:AArch64UtilsAndDesc",
760         "//llvm:AsmParser",
761         "//llvm:CodeGen",
762         "//llvm:CodeGenTypes",
763         "//llvm:Core",
764         "//llvm:MC",
765         "//llvm:Support",
766         "//llvm:Target",
767         "//third-party/unittest:gtest",
768         "//third-party/unittest:gtest_main",
769     ],
772 cc_test(
773     name = "testing_adt_tests",
774     size = "small",
775     srcs = glob(
776         [
777             "Testing/ADT/*.cpp",
778         ],
779         allow_empty = False,
780     ),
781     deps = [
782         "//llvm:Support",
783         "//llvm:TestingADT",
784         "//third-party/unittest:gtest",
785         "//third-party/unittest:gtest_main",
786     ],
789 cc_test(
790     name = "transforms_tests",
791     size = "small",
792     srcs = glob(
793         [
794             "Transforms/IPO/*.cpp",
795             "Transforms/IPO/*.h",
796             "Transforms/Utils/*.cpp",
797         ],
798         allow_empty = False,
799     ),
800     deps = [
801         "//llvm:Analysis",
802         "//llvm:AsmParser",
803         "//llvm:Core",
804         "//llvm:IPO",
805         "//llvm:IRReader",
806         "//llvm:Passes",
807         "//llvm:ProfileData",
808         "//llvm:Support",
809         "//llvm:TestingSupport",
810         "//llvm:TransformUtils",
811         "//llvm:Vectorize",
812         "//third-party/unittest:gmock",
813         "//third-party/unittest:gtest",
814         "//third-party/unittest:gtest_main",
815     ],
818 cc_test(
819     name = "llvm_exegesis_tests",
820     size = "small",
821     srcs = glob(
822         [
823             "tools/llvm-exegesis/*.cpp",
824             "tools/llvm-exegesis/X86/*.cpp",
825             "tools/llvm-exegesis/X86/*.h",
826         ],
827         allow_empty = False,
828     ) + [
829         "tools/llvm-exegesis/Common/AssemblerUtils.h",
830     ],
831     includes = ["tools/llvm-exegesis"],
832     deps = [
833         "//llvm:AllTargetsCodeGens",
834         "//llvm:AllTargetsDisassemblers",
835         "//llvm:CodeGen",
836         "//llvm:CodeGenTypes",
837         "//llvm:Exegesis",
838         "//llvm:MC",
839         "//llvm:MCDisassembler",
840         "//llvm:Support",
841         "//llvm:TargetParser",
842         "//llvm:TestingSupport",
843         "//llvm:X86CodeGen",
844         "//llvm:X86UtilsAndDesc",
845         "//third-party/unittest:gmock",
846         "//third-party/unittest:gtest",
847         "//third-party/unittest:gtest_main",
848     ],
851 cc_test(
852     name = "llvm_mca_tests",
853     size = "small",
854     srcs = glob(
855         [
856             "tools/llvm-mca/*.cpp",
857             "tools/llvm-mca/*.h",
858             "tools/llvm-mca/X86/*.cpp",
859             "tools/llvm-mca/X86/*.h",
860         ],
861         allow_empty = False,
862     ),
863     includes = ["tools/llvm-mca"],
864     deps = [
865         "//llvm:MC",
866         "//llvm:MCA",
867         "//llvm:MCAApplication",
868         "//llvm:Support",
869         "//llvm:TargetParser",
870         "//llvm:X86CodeGen",
871         "//llvm:X86UtilsAndDesc",
872         "//third-party/unittest:gtest",
873         "//third-party/unittest:gtest_main",
874     ],