Debian Codegraph @

utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel

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