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("@bazel_skylib//rules:expand_template.bzl", "expand_template")
6 load("//:workspace_root.bzl", "workspace_root")
7 load("//llvm:tblgen.bzl", "gentbl")
8 load("//llvm:binary_alias.bzl", "binary_alias")
9 load("//llvm:cc_plugin_library.bzl", "cc_plugin_library")
19 default_visibility = ["//visibility:public"],
20 features = ["layering_check"],
26 "tools/clang-format/clang-format.el",
27 "tools/clang-format/clang-format-test.el",
28 "tools/clang-format/clang-format.py",
29 "tools/clang-rename/clang-rename.el",
30 "tools/extra/clang-include-fixer/tool/clang-include-fixer.el",
31 "tools/extra/clang-include-fixer/tool/clang-include-fixer-test.el",
35 name = "clang-tblgen",
37 "utils/TableGen/*.cpp",
41 "$(STACK_FRAME_UNLIMITED)",
53 name = "diagnostic_defs_gen",
55 "-gen-clang-diags-defs -clang-component=%s" % c,
56 "include/clang/Basic/Diagnostic%sKinds.inc" % c,
72 "-gen-clang-diag-groups",
73 "include/clang/Basic/DiagnosticGroups.inc",
76 "-gen-clang-diags-index-name",
77 "include/clang/Basic/DiagnosticIndexName.inc",
80 tblgen = ":clang-tblgen",
81 td_file = "include/clang/Basic/Diagnostic.td",
82 td_srcs = glob(["include/clang/Basic/*.td"]),
86 name = "basic_arm_neon_inc_gen",
89 "include/clang/Basic/arm_neon.inc",
91 tblgen = ":clang-tblgen",
92 td_file = "include/clang/Basic/arm_neon.td",
94 "include/clang/Basic/arm_neon.td",
95 "include/clang/Basic/arm_neon_incl.td",
100 name = "basic_arm_fp16_inc_gen",
102 "-gen-arm-neon-sema",
103 "include/clang/Basic/arm_fp16.inc",
105 tblgen = ":clang-tblgen",
106 td_file = "include/clang/Basic/arm_fp16.td",
108 "include/clang/Basic/arm_fp16.td",
109 "include/clang/Basic/arm_neon_incl.td",
114 name = "basic_arm_mve_aliases_gen",
116 "-gen-arm-mve-builtin-aliases",
117 "include/clang/Basic/arm_mve_builtin_aliases.inc",
119 tblgen = ":clang-tblgen",
120 td_file = "include/clang/Basic/arm_mve.td",
122 "include/clang/Basic/arm_mve.td",
123 "include/clang/Basic/arm_mve_defs.td",
128 name = "basic_arm_sve_builtins_gen",
130 "-gen-arm-sve-builtins",
131 "include/clang/Basic/arm_sve_builtins.inc",
133 tblgen = ":clang-tblgen",
134 td_file = "include/clang/Basic/arm_sve.td",
136 "include/clang/Basic/arm_sve.td",
137 "include/clang/Basic/arm_sve_sme_incl.td",
142 name = "basic_arm_sve_builtin_cg_gen",
144 "-gen-arm-sve-builtin-codegen",
145 "include/clang/Basic/arm_sve_builtin_cg.inc",
147 tblgen = ":clang-tblgen",
148 td_file = "include/clang/Basic/arm_sve.td",
150 "include/clang/Basic/arm_sve.td",
151 "include/clang/Basic/arm_sve_sme_incl.td",
156 name = "basic_arm_sve_typeflags_gen",
158 "-gen-arm-sve-typeflags",
159 "include/clang/Basic/arm_sve_typeflags.inc",
161 tblgen = ":clang-tblgen",
162 td_file = "include/clang/Basic/arm_sve.td",
164 "include/clang/Basic/arm_sve.td",
165 "include/clang/Basic/arm_sve_sme_incl.td",
170 name = "basic_arm_sve_sema_rangechecks_gen",
172 "-gen-arm-sve-sema-rangechecks",
173 "include/clang/Basic/arm_sve_sema_rangechecks.inc",
175 tblgen = ":clang-tblgen",
176 td_file = "include/clang/Basic/arm_sve.td",
178 "include/clang/Basic/arm_sve.td",
179 "include/clang/Basic/arm_sve_sme_incl.td",
184 name = "basic_arm_sme_builtins_gen",
186 "-gen-arm-sme-builtins",
187 "include/clang/Basic/arm_sme_builtins.inc",
189 tblgen = ":clang-tblgen",
190 td_file = "include/clang/Basic/arm_sme.td",
192 "include/clang/Basic/arm_sme.td",
193 "include/clang/Basic/arm_sve_sme_incl.td",
198 name = "basic_arm_sme_builtin_cg_gen",
200 "-gen-arm-sme-builtin-codegen",
201 "include/clang/Basic/arm_sme_builtin_cg.inc",
203 tblgen = ":clang-tblgen",
204 td_file = "include/clang/Basic/arm_sme.td",
206 "include/clang/Basic/arm_sme.td",
207 "include/clang/Basic/arm_sve_sme_incl.td",
212 name = "basic_arm_sme_sema_rangechecks_gen",
214 "-gen-arm-sme-sema-rangechecks",
215 "include/clang/Basic/arm_sme_sema_rangechecks.inc",
217 tblgen = ":clang-tblgen",
218 td_file = "include/clang/Basic/arm_sme.td",
220 "include/clang/Basic/arm_sme.td",
221 "include/clang/Basic/arm_sve_sme_incl.td",
226 name = "basic_arm_mve_cg_gen",
228 "-gen-arm-mve-builtin-codegen",
229 "include/clang/Basic/arm_mve_builtin_cg.inc",
231 tblgen = ":clang-tblgen",
232 td_file = "include/clang/Basic/arm_mve.td",
234 "include/clang/Basic/arm_mve.td",
235 "include/clang/Basic/arm_mve_defs.td",
240 name = "basic_arm_mve_inc_gen",
242 "-gen-arm-mve-builtin-def",
243 "include/clang/Basic/arm_mve_builtins.inc",
245 tblgen = ":clang-tblgen",
246 td_file = "include/clang/Basic/arm_mve.td",
248 "include/clang/Basic/arm_mve.td",
249 "include/clang/Basic/arm_mve_defs.td",
254 name = "basic_arm_mve_sema_gen",
256 "-gen-arm-mve-builtin-sema",
257 "include/clang/Basic/arm_mve_builtin_sema.inc",
259 tblgen = ":clang-tblgen",
260 td_file = "include/clang/Basic/arm_mve.td",
262 "include/clang/Basic/arm_mve.td",
263 "include/clang/Basic/arm_mve_defs.td",
268 name = "basic_riscv_vector_builtins_gen",
270 "-gen-riscv-vector-builtins",
271 "include/clang/Basic/riscv_vector_builtins.inc",
273 tblgen = ":clang-tblgen",
274 td_file = "include/clang/Basic/riscv_vector.td",
276 "include/clang/Basic/riscv_vector.td",
277 "include/clang/Basic/riscv_vector_common.td",
282 name = "basic_riscv_vector_builtin_cg_gen",
284 "-gen-riscv-vector-builtin-codegen",
285 "include/clang/Basic/riscv_vector_builtin_cg.inc",
287 tblgen = ":clang-tblgen",
288 td_file = "include/clang/Basic/riscv_vector.td",
290 "include/clang/Basic/riscv_vector.td",
291 "include/clang/Basic/riscv_vector_common.td",
296 name = "basic_riscv_vector_builtin_sema_gen",
298 "-gen-riscv-vector-builtin-sema",
299 "include/clang/Basic/riscv_vector_builtin_sema.inc",
301 tblgen = ":clang-tblgen",
302 td_file = "include/clang/Basic/riscv_vector.td",
304 "include/clang/Basic/riscv_vector.td",
305 "include/clang/Basic/riscv_vector_common.td",
310 name = "basic_riscv_sifive_vector_builtins_gen",
312 "-gen-riscv-sifive-vector-builtins",
313 "include/clang/Basic/riscv_sifive_vector_builtins.inc",
315 tblgen = ":clang-tblgen",
316 td_file = "include/clang/Basic/riscv_sifive_vector.td",
318 "include/clang/Basic/riscv_sifive_vector.td",
319 "include/clang/Basic/riscv_vector_common.td",
324 name = "basic_riscv_sifive_vector_builtin_cg_gen",
326 "-gen-riscv-sifive-vector-builtin-codegen",
327 "include/clang/Basic/riscv_sifive_vector_builtin_cg.inc",
329 tblgen = ":clang-tblgen",
330 td_file = "include/clang/Basic/riscv_sifive_vector.td",
332 "include/clang/Basic/riscv_sifive_vector.td",
333 "include/clang/Basic/riscv_vector_common.td",
338 name = "basic_riscv_sifive_vector_builtin_sema_gen",
340 "-gen-riscv-sifive-vector-builtin-sema",
341 "include/clang/Basic/riscv_sifive_vector_builtin_sema.inc",
343 tblgen = ":clang-tblgen",
344 td_file = "include/clang/Basic/riscv_sifive_vector.td",
346 "include/clang/Basic/riscv_sifive_vector.td",
347 "include/clang/Basic/riscv_vector_common.td",
352 name = "basic_arm_cde_gen",
354 "-gen-arm-cde-builtin-def",
355 "include/clang/Basic/arm_cde_builtins.inc",
357 tblgen = ":clang-tblgen",
358 td_file = "include/clang/Basic/arm_cde.td",
360 "include/clang/Basic/arm_cde.td",
361 "include/clang/Basic/arm_mve_defs.td",
366 name = "basic_arm_cde_aliases_gen",
368 "-gen-arm-cde-builtin-aliases",
369 "include/clang/Basic/arm_cde_builtin_aliases.inc",
371 tblgen = ":clang-tblgen",
372 td_file = "include/clang/Basic/arm_cde.td",
374 "include/clang/Basic/arm_cde.td",
375 "include/clang/Basic/arm_mve_defs.td",
380 name = "basic_arm_cde_cg_gen",
382 "-gen-arm-cde-builtin-codegen",
383 "include/clang/Basic/arm_cde_builtin_cg.inc",
385 tblgen = ":clang-tblgen",
386 td_file = "include/clang/Basic/arm_cde.td",
388 "include/clang/Basic/arm_cde.td",
389 "include/clang/Basic/arm_mve_defs.td",
394 name = "basic_arm_cde_sema_gen",
396 "-gen-arm-cde-builtin-sema",
397 "include/clang/Basic/arm_cde_builtin_sema.inc",
399 tblgen = ":clang-tblgen",
400 td_file = "include/clang/Basic/arm_cde.td",
402 "include/clang/Basic/arm_cde.td",
403 "include/clang/Basic/arm_mve_defs.td",
408 name = "basic_attr_gen",
411 "-gen-clang-attr-has-attribute-impl",
412 "include/clang/Basic/AttrHasAttributeImpl.inc",
415 "-gen-clang-attr-list",
416 "include/clang/Basic/AttrList.inc",
419 "-gen-clang-attr-subject-match-rule-list",
420 "include/clang/Basic/AttrSubMatchRulesList.inc",
423 "-gen-clang-attr-token-kinds",
424 "include/clang/Basic/AttrTokenKinds.inc",
427 tblgen = ":clang-tblgen",
428 td_file = "include/clang/Basic/Attr.td",
430 "include/clang/Basic/ASTNode.td",
431 "include/clang/Basic/Attr.td",
432 "include/clang/Basic/AttrDocs.td",
433 "include/clang/Basic/DeclNodes.td",
434 "include/clang/Basic/StmtNodes.td",
439 name = "libsema_openclbuiltins_inc_gen",
440 strip_include_prefix = "lib/Sema",
442 "-gen-clang-opencl-builtins",
443 "lib/Sema/OpenCLBuiltins.inc",
445 tblgen = ":clang-tblgen",
446 td_file = "lib/Sema/OpenCLBuiltins.td",
448 "lib/Sema/OpenCLBuiltins.td",
452 # Table definition files can be used for documentation:
454 name = "all_table_defs",
455 srcs = glob(["include/**/*.td"]),
459 glob(["include/**/*.td"]),
463 name = "basic_version_gen",
464 outs = ["include/clang/Basic/Version.inc"],
466 "echo '#define CLANG_VERSION {vers}' >> $@\n" +
467 "echo '#define CLANG_VERSION_MAJOR {major}' >> $@\n" +
468 "echo '#define CLANG_VERSION_MAJOR_STRING \"{major}\"' >> $@\n" +
469 "echo '#define CLANG_VERSION_MINOR {minor}' >> $@\n" +
470 "echo '#define CLANG_VERSION_PATCHLEVEL {patch}' >> $@\n" +
471 "echo '#define CLANG_VERSION_STRING \"{vers}\"' >> $@\n"
473 major = LLVM_VERSION_MAJOR,
474 minor = LLVM_VERSION_MINOR,
475 patch = LLVM_VERSION_PATCH,
483 "include/clang/Basic/Version.inc",
484 "include/clang/Config/config.h",
486 includes = ["include"],
488 # We rely on the LLVM config library to provide configuration defines.
493 # TODO: This should get replaced with something that actually generates the
494 # correct version number.
496 name = "vcs_version_gen",
497 # This should be under lib/Basic, but because of how the include paths
498 # are passed through bazel, it's easier to drop generated files next to
499 # the other includes.
500 outs = ["include/VCSVersion.inc"],
501 cmd = "echo '#undef CLANG_REVISION' > $@",
505 name = "bundle_resources",
507 "utils/bundle_resources.py",
509 main = "utils/bundle_resources.py",
512 # A hacky library to expose some internal headers of the `basic` library to its
513 # own implementation source files using a stripped include prefix rather than
514 # file-relative-inclusion. This is inherently non-modular as these headers will
515 # be repeated in the sources below for file-relative-inclusion.
517 name = "basic_internal_headers",
521 features = ["-header_modules"],
522 strip_include_prefix = "lib/Basic",
528 "include/VCSVersion.inc",
529 "include/clang/Basic/Version.inc",
534 "lib/Basic/Targets/*.cpp",
535 "lib/Basic/Targets/*.h",
538 "include/clang/Basic/*.h",
541 "-DHAVE_VCS_VERSION_INC",
542 "$(STACK_FRAME_UNLIMITED)",
544 includes = ["include"],
546 "include/clang/Basic/arm_fp16.inc",
547 "include/clang/Basic/arm_mve_builtins.inc",
548 "include/clang/Basic/arm_mve_builtin_aliases.inc",
549 "include/clang/Basic/arm_mve_builtin_cg.inc",
550 "include/clang/Basic/arm_mve_builtin_sema.inc",
551 "include/clang/Basic/arm_sme_builtins.inc",
552 "include/clang/Basic/arm_sme_builtin_cg.inc",
553 "include/clang/Basic/arm_neon.inc",
554 "include/clang/Basic/AttrHasAttributeImpl.inc",
555 "include/clang/Basic/AttrList.inc",
556 "include/clang/Basic/AttrSubMatchRulesList.inc",
557 "include/clang/Basic/DiagnosticASTKinds.inc",
558 "include/clang/Basic/DiagnosticGroups.inc",
559 "include/clang/Basic/DiagnosticRefactoringKinds.inc",
560 "include/clang/Basic/DiagnosticAnalysisKinds.inc",
561 "include/clang/Basic/DiagnosticSemaKinds.inc",
562 "include/clang/Basic/DiagnosticCommentKinds.inc",
563 "include/clang/Basic/DiagnosticParseKinds.inc",
564 "include/clang/Basic/DiagnosticLexKinds.inc",
565 "include/clang/Basic/DiagnosticSerializationKinds.inc",
566 "include/clang/Basic/DiagnosticFrontendKinds.inc",
567 "include/clang/Basic/DiagnosticDriverKinds.inc",
568 "include/clang/Basic/DiagnosticCrossTUKinds.inc",
569 "include/clang/Basic/DiagnosticCommonKinds.inc",
570 "include/clang/Basic/DiagnosticIndexName.inc",
572 "include/clang/Basic/*.def",
575 ":basic_arm_cde_gen",
576 ":basic_arm_fp16_inc_gen",
577 ":basic_arm_mve_aliases_gen",
578 ":basic_arm_mve_cg_gen",
579 ":basic_arm_mve_inc_gen",
580 ":basic_arm_mve_sema_gen",
581 ":basic_arm_neon_inc_gen",
582 ":basic_arm_sme_builtin_cg_gen",
583 ":basic_arm_sme_builtins_gen",
584 ":basic_arm_sve_builtins_gen",
585 ":basic_arm_sve_typeflags_gen",
587 ":basic_internal_headers",
588 ":basic_riscv_sifive_vector_builtins_gen",
589 ":basic_riscv_vector_builtin_cg_gen",
590 ":basic_riscv_vector_builtins_gen",
592 ":diagnostic_defs_gen",
595 "//llvm:FrontendDebug",
596 "//llvm:FrontendOpenMP",
597 "//llvm:Instrumentation",
601 "//llvm:TargetParser",
613 "include/clang/Lex/*.h",
615 includes = ["include"],
620 "//llvm:TargetParser",
625 name = "ast_attr_gen",
628 "-gen-clang-attr-ast-visitor",
629 "include/clang/AST/AttrVisitor.inc",
632 "-gen-clang-attr-classes",
633 "include/clang/AST/Attrs.inc",
636 "-gen-clang-attr-doc-table",
637 "lib/AST/AttrDocTable.inc",
640 "-gen-clang-attr-text-node-dump",
641 "include/clang/AST/AttrTextNodeDump.inc",
644 "-gen-clang-attr-node-traverse",
645 "include/clang/AST/AttrNodeTraverse.inc",
648 "-gen-clang-attr-impl",
649 "include/clang/AST/AttrImpl.inc",
652 "-gen-clang-attr-can-print-left-list",
653 "include/clang/Basic/AttrLeftSideCanPrintList.inc",
656 "-gen-clang-attr-must-print-left-list",
657 "include/clang/Basic/AttrLeftSideMustPrintList.inc",
660 tblgen = ":clang-tblgen",
661 td_file = "include/clang/Basic/Attr.td",
663 "include/clang/Basic/Attr.td",
664 "include/clang/Basic/AttrDocs.td",
665 "include/clang/Basic/ASTNode.td",
666 "include/clang/Basic/DeclNodes.td",
667 "include/clang/Basic/StmtNodes.td",
672 name = "ast_decl_nodes_gen",
674 "-gen-clang-decl-nodes",
675 "include/clang/AST/DeclNodes.inc",
677 tblgen = ":clang-tblgen",
678 td_file = "include/clang/Basic/DeclNodes.td",
680 "include/clang/Basic/ASTNode.td",
681 "include/clang/Basic/DeclNodes.td",
686 name = "ast_stmt_nodes_gen",
688 "-gen-clang-stmt-nodes",
689 "include/clang/AST/StmtNodes.inc",
691 tblgen = ":clang-tblgen",
692 td_file = "include/clang/Basic/StmtNodes.td",
694 "include/clang/Basic/ASTNode.td",
695 "include/clang/Basic/StmtNodes.td",
700 name = "ast_comment_nodes_gen",
702 "-gen-clang-comment-nodes",
703 "include/clang/AST/CommentNodes.inc",
705 tblgen = ":clang-tblgen",
706 td_file = "include/clang/Basic/CommentNodes.td",
708 "include/clang/Basic/ASTNode.td",
709 "include/clang/Basic/CommentNodes.td",
714 name = "ast_comment_command_info_gen",
717 "-gen-clang-comment-command-info",
718 "include/clang/AST/CommentCommandInfo.inc",
721 "-gen-clang-comment-command-list",
722 "include/clang/AST/CommentCommandList.inc",
725 tblgen = ":clang-tblgen",
726 td_file = "include/clang/AST/CommentCommands.td",
727 td_srcs = ["include/clang/AST/CommentCommands.td"],
731 name = "ast_comment_html_tags_gen",
733 "-gen-clang-comment-html-tags",
734 "include/clang/AST/CommentHTMLTags.inc",
736 tblgen = ":clang-tblgen",
737 td_file = "include/clang/AST/CommentHTMLTags.td",
738 td_srcs = ["include/clang/AST/CommentHTMLTags.td"],
742 name = "ast_comment_html_tags_properties_gen",
744 "-gen-clang-comment-html-tags-properties",
745 "include/clang/AST/CommentHTMLTagsProperties.inc",
747 tblgen = ":clang-tblgen",
748 td_file = "include/clang/AST/CommentHTMLTags.td",
749 td_srcs = ["include/clang/AST/CommentHTMLTags.td"],
753 name = "ast_comment_html_named_character_references_gen",
755 "-gen-clang-comment-html-named-character-references",
756 "include/clang/AST/CommentHTMLNamedCharacterReferences.inc",
758 tblgen = ":clang-tblgen",
759 td_file = "include/clang/AST/CommentHTMLNamedCharacterReferences.td",
760 td_srcs = ["include/clang/AST/CommentHTMLNamedCharacterReferences.td"],
764 name = "ast_stmt_data_collectors_gen",
766 "-gen-clang-data-collectors",
767 "include/clang/AST/StmtDataCollectors.inc",
769 tblgen = ":clang-tblgen",
770 td_file = "include/clang/AST/StmtDataCollectors.td",
771 td_srcs = ["include/clang/AST/StmtDataCollectors.td"],
775 name = "ast_interp_opcodes_gen",
777 "-gen-clang-opcodes",
778 "lib/AST/Interp/Opcodes.inc",
780 tblgen = ":clang-tblgen",
781 td_file = "lib/AST/Interp/Opcodes.td",
782 td_srcs = ["lib/AST/Interp/Opcodes.td"],
786 name = "ast_properties_base_gen",
789 "-gen-clang-basic-reader",
790 "include/clang/AST/AbstractBasicReader.inc",
793 "-gen-clang-basic-writer",
794 "include/clang/AST/AbstractBasicWriter.inc",
797 tblgen = ":clang-tblgen",
798 td_file = "include/clang/AST/PropertiesBase.td",
799 td_srcs = ["include/clang/AST/PropertiesBase.td"],
803 name = "ast_type_properties_gen",
806 "-gen-clang-type-reader",
807 "include/clang/AST/AbstractTypeReader.inc",
810 "-gen-clang-type-writer",
811 "include/clang/AST/AbstractTypeWriter.inc",
814 tblgen = ":clang-tblgen",
815 td_file = "include/clang/AST/TypeProperties.td",
817 "include/clang/AST/PropertiesBase.td",
818 "include/clang/AST/TypeProperties.td",
819 "include/clang/Basic/ASTNode.td",
820 "include/clang/Basic/TypeNodes.td",
825 name = "type_nodes_gen",
827 "-gen-clang-type-nodes",
828 "include/clang/AST/TypeNodes.inc",
830 tblgen = ":clang-tblgen",
831 td_file = "include/clang/Basic/TypeNodes.td",
833 "include/clang/Basic/ASTNode.td",
834 "include/clang/Basic/TypeNodes.td",
838 workspace_root(name = "workspace_root")
845 "lib/AST/Interp/*.cpp",
846 "lib/AST/Interp/*.h",
848 "lib/AST/AttrDocTable.inc",
849 "lib/AST/Interp/Opcodes.inc",
852 "include/clang/AST/*.h",
855 # FIXME: This is necessary to allow "file relative" include paths from
856 # non-generated `srcs` to find generated `srcs` above. Bazel should
857 # either make this work automatically by creating a unified tree of
858 # `srcs` or at least provide a `local_includes` that has the path
859 # translation logic of `includes` but is only used locally (similar to
860 # `local_defines` vs. `defines`). Until one of those lands, this is the
861 # least bad approach. Using `includes` is *specifically* problematic for
862 # this library because it contains files that collide easily with system
863 # headers such as `CXXABI.h`.
864 "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/lib/AST",
865 "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/lib/AST/Interp",
868 "include/clang/AST/AttrImpl.inc",
869 "include/clang/AST/AttrNodeTraverse.inc",
870 "include/clang/AST/Attrs.inc",
871 "include/clang/AST/AttrTextNodeDump.inc",
872 "include/clang/AST/AttrVisitor.inc",
873 "include/clang/AST/CommentCommandInfo.inc",
874 "include/clang/AST/CommentCommandList.inc",
875 "include/clang/AST/CommentHTMLNamedCharacterReferences.inc",
876 "include/clang/AST/CommentHTMLTags.inc",
877 "include/clang/AST/CommentHTMLTagsProperties.inc",
878 "include/clang/AST/CommentNodes.inc",
879 "include/clang/AST/DeclNodes.inc",
880 "include/clang/AST/StmtDataCollectors.inc",
881 "include/clang/AST/StmtNodes.inc",
883 "include/clang/AST/*.def",
890 ":ast_comment_command_info_gen",
891 ":ast_comment_html_named_character_references_gen",
892 ":ast_comment_html_tags_gen",
893 ":ast_comment_html_tags_properties_gen",
894 ":ast_comment_nodes_gen",
895 ":ast_decl_nodes_gen",
896 ":ast_interp_opcodes_gen",
897 ":ast_properties_base_gen",
898 ":ast_stmt_data_collectors_gen",
899 ":ast_stmt_nodes_gen",
900 ":ast_type_properties_gen",
904 "//llvm:BinaryFormat",
906 "//llvm:FrontendHLSL",
907 "//llvm:FrontendOpenMP",
909 "//llvm:TargetParser",
920 "include/clang/Index/*.h",
921 "include/clang-c/*.h",
923 includes = ["include"],
938 name = "analysis_htmllogger_gen",
940 "lib/Analysis/FlowSensitive/HTMLLogger.html",
941 "lib/Analysis/FlowSensitive/HTMLLogger.css",
942 "lib/Analysis/FlowSensitive/HTMLLogger.js",
944 outs = ["lib/Analysis/FlowSensitive/HTMLLogger.inc"],
945 cmd = "$(location :bundle_resources) $@ $(SRCS)",
946 tools = [":bundle_resources"],
952 "lib/Analysis/FlowSensitive/Models/*.cpp",
953 "lib/Analysis/FlowSensitive/*.cpp",
954 "lib/Analysis/*.cpp",
957 ":analysis_htmllogger_gen",
960 "include/clang/Analysis/**/*.h",
964 "lib/Analysis/FlowSensitive",
966 textual_hdrs = glob([
967 "include/clang/Analysis/**/*.def",
979 name = "sema_attr_gen",
982 "-gen-clang-attr-parsed-attr-impl",
983 "include/clang/Sema/AttrParsedAttrImpl.inc",
986 "-gen-clang-attr-parsed-attr-kinds",
987 "include/clang/Sema/AttrParsedAttrKinds.inc",
990 "-gen-clang-attr-parsed-attr-list",
991 "include/clang/Sema/AttrParsedAttrList.inc",
994 "-gen-clang-attr-spelling-index",
995 "include/clang/Sema/AttrSpellingListIndex.inc",
998 "-gen-clang-attr-template-instantiate",
999 "include/clang/Sema/AttrTemplateInstantiate.inc",
1002 tblgen = ":clang-tblgen",
1003 td_file = "include/clang/Basic/Attr.td",
1005 "include/clang/Basic/ASTNode.td",
1006 "include/clang/Basic/Attr.td",
1007 "include/clang/Basic/AttrDocs.td",
1008 "include/clang/Basic/DeclNodes.td",
1009 "include/clang/Basic/StmtNodes.td",
1020 "include/clang/Sema/*.h",
1021 "include/clang-c/*.h",
1023 copts = ["$(STACK_FRAME_UNLIMITED)"],
1024 includes = ["include"],
1026 "include/clang/Sema/AttrParsedAttrImpl.inc",
1027 "include/clang/Sema/AttrParsedAttrKinds.inc",
1028 "include/clang/Sema/AttrParsedAttrList.inc",
1029 "include/clang/Sema/AttrSpellingListIndex.inc",
1030 "include/clang/Sema/AttrTemplateInstantiate.inc",
1031 "lib/Sema/OpenCLBuiltins.inc",
1037 ":basic_arm_cde_aliases_gen",
1038 ":basic_arm_cde_sema_gen",
1039 ":basic_arm_sme_builtins_gen",
1040 ":basic_arm_sme_sema_rangechecks_gen",
1041 ":basic_arm_sve_builtins_gen",
1042 ":basic_arm_sve_sema_rangechecks_gen",
1043 ":basic_riscv_sifive_vector_builtin_sema_gen",
1044 ":basic_riscv_vector_builtin_sema_gen",
1047 ":libsema_openclbuiltins_inc_gen",
1051 "//llvm:AllTargetsAsmParsers",
1052 "//llvm:AllTargetsCodeGens",
1054 "//llvm:FrontendHLSL",
1055 "//llvm:FrontendOpenMP",
1059 "//llvm:TargetParser",
1064 name = "parse_attr_gen",
1067 "-gen-clang-attr-parser-string-switches",
1068 "include/clang/Parse/AttrParserStringSwitches.inc",
1071 "-gen-clang-attr-subject-match-rules-parser-string-switches",
1072 "include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc",
1075 tblgen = ":clang-tblgen",
1076 td_file = "include/clang/Basic/Attr.td",
1078 "include/clang/Basic/ASTNode.td",
1079 "include/clang/Basic/Attr.td",
1080 "include/clang/Basic/AttrDocs.td",
1081 "include/clang/Basic/DeclNodes.td",
1082 "include/clang/Basic/StmtNodes.td",
1094 "include/clang/Parse/AttrParserStringSwitches.inc",
1095 "include/clang/Parse/AttrSubMatchRulesParserStringSwitches.inc",
1096 ] + glob(["include/clang/Parse/*.h"]),
1097 includes = ["include"],
1104 "//llvm:FrontendOpenMP",
1112 name = "ast_matchers",
1114 "lib/ASTMatchers/*.cpp",
1115 "lib/ASTMatchers/*.h",
1117 hdrs = glob(["include/clang/ASTMatchers/*.h"]),
1118 includes = ["include"],
1128 name = "ast_matchers_dynamic",
1130 "lib/ASTMatchers/Dynamic/*.cpp",
1131 "lib/ASTMatchers/Dynamic/*.h",
1133 hdrs = glob(["include/clang/ASTMatchers/Dynamic/*.h"]),
1134 copts = ["$(STACK_FRAME_UNLIMITED)"],
1135 includes = ["include"],
1140 "//llvm:FrontendOpenMP",
1148 "lib/Rewrite/*.cpp",
1151 hdrs = glob(["include/clang/Rewrite/Core/*.h"]),
1152 includes = ["include"],
1166 "lib/Testing/*.cpp",
1168 hdrs = glob(["include/clang/Testing/*.h"]),
1169 includes = ["include"],
1175 "//third-party/unittest:gtest",
1180 name = "tooling_core",
1182 "lib/Tooling/Core/*.cpp",
1183 "lib/Tooling/Core/*.h",
1185 hdrs = glob(["include/clang/Tooling/Core/*.h"]),
1186 includes = ["include"],
1200 "lib/Tooling/*.cpp",
1202 # Temporarily disable until we support the generated file.
1203 exclude = ["lib/Tooling/NodeIntrospection.cpp"],
1206 "include/clang/Tooling/*.h",
1208 includes = ["include"],
1221 "//llvm:TargetParser",
1226 name = "tooling_inclusions",
1228 "lib/Tooling/Inclusions/**/*.cpp",
1229 "lib/Tooling/Inclusions/**/*.inc",
1232 "include/clang/Tooling/Inclusions/**/*.h",
1245 name = "tooling_refactoring",
1247 "lib/Tooling/Refactoring/**/*.cpp",
1248 "lib/Tooling/Refactoring/**/*.h",
1251 "include/clang/Tooling/Refactoring/**/*.h",
1252 "include/clang/Tooling/Refactoring/**/*.def",
1270 name = "tooling_syntax_gen",
1272 ("-gen-clang-syntax-node-list", "include/clang/Tooling/Syntax/Nodes.inc"),
1273 ("-gen-clang-syntax-node-classes", "include/clang/Tooling/Syntax/NodeClasses.inc"),
1275 tblgen = ":clang-tblgen",
1276 td_file = "include/clang/Tooling/Syntax/Nodes.td",
1278 "include/clang/Tooling/Syntax/Nodes.td",
1279 "include/clang/Tooling/Syntax/Syntax.td",
1284 name = "tooling_syntax",
1285 srcs = glob(["lib/Tooling/Syntax/**/*.cpp"]),
1286 hdrs = glob(["include/clang/Tooling/Syntax/**/*.h"]),
1292 ":tooling_syntax_gen",
1298 name = "tooling_dependency_scanning",
1299 srcs = glob(["lib/Tooling/DependencyScanning/**/*.cpp"]),
1300 hdrs = glob(["include/clang/Tooling/DependencyScanning/**/*.h"]),
1310 "//llvm:TargetParser",
1315 name = "transformer",
1316 srcs = glob(["lib/Tooling/Transformer/**/*.cpp"]),
1317 hdrs = glob(["include/clang/Tooling/Transformer/**/*.h"]),
1324 ":tooling_refactoring",
1331 srcs = glob(["lib/Tooling/ASTDiff/*.cpp"]),
1332 hdrs = glob(["include/clang/Tooling/ASTDiff/*.h"]),
1343 srcs = glob(["lib/CrossTU/*.cpp"]),
1344 hdrs = glob(["include/clang/CrossTU/*.h"]),
1353 "//llvm:TargetParser",
1366 "lib/Format/FormatTokenLexer.h",
1367 "lib/Format/FormatTokenSource.h",
1368 "lib/Format/Macros.h",
1369 "lib/Format/QualifierAlignmentFixer.h",
1370 "lib/Format/UnwrappedLineParser.h",
1372 "include/clang/Format/*.h",
1374 includes = ["include"],
1379 ":tooling_inclusions",
1386 srcs = glob(["lib/Edit/*.cpp"]),
1387 hdrs = glob(["include/clang/Edit/*.h"]),
1388 includes = ["include"],
1398 name = "static_analyzer_core_options",
1400 "include/clang/StaticAnalyzer/Core/AnalyzerOptions.h",
1403 "include/clang/StaticAnalyzer/Core/Analyses.def",
1404 "include/clang/StaticAnalyzer/Core/AnalyzerOptions.def",
1408 ":static_analyzer_checkers_gen",
1414 name = "static_analyzer_core",
1416 "lib/StaticAnalyzer/Core/**/*.cpp",
1417 "lib/StaticAnalyzer/Core/**/*.h",
1420 "include/clang/StaticAnalyzer/Core/**/*.h",
1422 includes = ["include"],
1423 textual_hdrs = glob([
1424 "include/clang/StaticAnalyzer/Core/**/*.def",
1436 ":static_analyzer_checkers_gen",
1444 name = "static_analyzer_checkers_gen",
1446 "-gen-clang-sa-checkers",
1447 "include/clang/StaticAnalyzer/Checkers/Checkers.inc",
1449 tblgen = ":clang-tblgen",
1450 td_file = "include/clang/StaticAnalyzer/Checkers/Checkers.td",
1452 "include/clang/StaticAnalyzer/Checkers/CheckerBase.td",
1453 "include/clang/StaticAnalyzer/Checkers/Checkers.td",
1458 name = "static_analyzer_checkers",
1460 "lib/StaticAnalyzer/Checkers/**/*.cpp",
1461 "lib/StaticAnalyzer/Checkers/**/*.h",
1464 "include/clang/StaticAnalyzer/Checkers/Checkers.inc",
1466 "include/clang/StaticAnalyzer/Checkers/**/*.h",
1468 copts = ["$(STACK_FRAME_UNLIMITED)"],
1469 includes = ["include"],
1477 ":static_analyzer_checkers_gen",
1478 ":static_analyzer_core",
1484 name = "driver_options_inc_gen",
1486 "-gen-opt-parser-defs",
1487 "include/clang/Driver/Options.inc",
1489 tblgen = "//llvm:llvm-tblgen",
1490 td_file = "include/clang/Driver/Options.td",
1492 "//llvm:include/llvm/Option/OptParser.td",
1502 "lib/Driver/Arch/*.cpp",
1503 "lib/Driver/Arch/*.h",
1504 "lib/Driver/ToolChains/*.cpp",
1505 "lib/Driver/ToolChains/*.h",
1506 "lib/Driver/ToolChains/Arch/*.cpp",
1507 "lib/Driver/ToolChains/Arch/*.h",
1510 "lib/Driver/ToolChains/MSVCSetupApi.h",
1514 "include/clang/Driver/*.h",
1516 copts = ["$(STACK_FRAME_UNLIMITED)"],
1519 # TODO: This is likely a layering issue, but files in Arch are currently
1520 # directly #including "Tools.h".
1524 "@platforms//os:windows": ["version.lib"],
1525 "//conditions:default": [],
1527 textual_hdrs = glob([
1528 "include/clang/Driver/*.def",
1534 ":driver_options_inc_gen",
1536 ":static_analyzer_checkers_gen",
1537 "//llvm:BinaryFormat",
1538 "//llvm:FrontendDebug",
1539 "//llvm:Instrumentation",
1543 "//llvm:ProfileData",
1546 "//llvm:TargetParser",
1547 "//llvm:WindowsDriver",
1553 name = "headers_arm_neon_gen",
1556 "lib/Headers/arm_neon.h",
1558 tblgen = ":clang-tblgen",
1559 td_file = "include/clang/Basic/arm_neon.td",
1561 "include/clang/Basic/arm_neon.td",
1562 "include/clang/Basic/arm_neon_incl.td",
1567 name = "headers_arm_fp16_gen",
1570 "lib/Headers/arm_fp16.h",
1572 tblgen = ":clang-tblgen",
1573 td_file = "include/clang/Basic/arm_fp16.td",
1575 "include/clang/Basic/arm_fp16.td",
1576 "include/clang/Basic/arm_neon_incl.td",
1581 name = "headers_arm_mve_gen",
1583 "-gen-arm-mve-header",
1584 "lib/Headers/arm_mve.h",
1586 tblgen = ":clang-tblgen",
1587 td_file = "include/clang/Basic/arm_mve.td",
1589 "include/clang/Basic/arm_mve.td",
1590 "include/clang/Basic/arm_mve_defs.td",
1595 name = "headers_arm_cde_gen",
1597 "-gen-arm-cde-header",
1598 "lib/Headers/arm_cde.h",
1600 tblgen = ":clang-tblgen",
1601 td_file = "include/clang/Basic/arm_cde.td",
1603 "include/clang/Basic/arm_cde.td",
1604 "include/clang/Basic/arm_mve_defs.td",
1609 name = "headers_arm_sve_gen",
1611 "-gen-arm-sve-header",
1612 "lib/Headers/arm_sve.h",
1614 tblgen = ":clang-tblgen",
1615 td_file = "include/clang/Basic/arm_sve.td",
1617 "include/clang/Basic/arm_sve.td",
1618 "include/clang/Basic/arm_sve_sme_incl.td",
1623 name = "headers_arm_bf16_gen",
1626 "lib/Headers/arm_bf16.h",
1628 tblgen = ":clang-tblgen",
1629 td_file = "include/clang/Basic/arm_bf16.td",
1631 "include/clang/Basic/arm_bf16.td",
1632 "include/clang/Basic/arm_neon_incl.td",
1637 name = "headers_arm_sme_draft_spec_subject_to_change_gen",
1639 "-Wno-implicit-fallthrough",
1640 "-Wno-error=frame-larger-than=",
1643 "-gen-arm-sme-header",
1644 "lib/Headers/arm_sme_draft_spec_subject_to_change.h",
1646 tblgen = ":clang-tblgen",
1647 td_file = "include/clang/Basic/arm_sme.td",
1649 "include/clang/Basic/arm_sme.td",
1650 "include/clang/Basic/arm_sve_sme_incl.td",
1655 name = "headers_riscv_vector",
1657 "-gen-riscv-vector-header",
1658 "lib/Headers/riscv_vector.h",
1660 tblgen = ":clang-tblgen",
1661 td_file = "include/clang/Basic/riscv_vector.td",
1663 "include/clang/Basic/riscv_vector.td",
1664 "include/clang/Basic/riscv_vector_common.td",
1668 # We generate the set of builtin headers under a special subdirectory in the
1669 # 'bin' section of the bazel output so that they can be used as data
1670 # dependencies. It requires listing explicitly all the generated inputs here.
1671 builtin_headers = glob(
1672 ["lib/Headers/**/*.h"],
1674 # FIXME: They are not handled in CMake side.
1675 "lib/Headers/openmp_wrappers/stdlib.h",
1676 "lib/Headers/openmp_wrappers/time.h",
1677 "lib/Headers/ppc_wrappers/nmmintrin.h",
1680 "lib/Headers/arm_cde.h",
1681 "lib/Headers/arm_fp16.h",
1682 "lib/Headers/arm_mve.h",
1683 "lib/Headers/arm_neon.h",
1684 "lib/Headers/arm_sve.h",
1685 "lib/Headers/arm_sme_draft_spec_subject_to_change.h",
1686 "lib/Headers/arm_bf16.h",
1687 "lib/Headers/module.modulemap",
1688 "lib/Headers/riscv_vector.h",
1689 "lib/Headers/cuda_wrappers/algorithm",
1690 "lib/Headers/cuda_wrappers/complex",
1691 "lib/Headers/cuda_wrappers/new",
1692 "lib/Headers/openmp_wrappers/cmath",
1693 "lib/Headers/openmp_wrappers/complex",
1694 "lib/Headers/openmp_wrappers/new",
1698 name = "builtin_headers_gen",
1699 srcs = builtin_headers,
1700 outs = [hdr.replace("lib/Headers/", "staging/include/") for hdr in builtin_headers],
1702 for src in $(SRCS); do
1703 relsrc=$${src#*"$(WORKSPACE_ROOT)"/clang/lib/Headers}
1704 target=$(@D)/staging/include/$$relsrc
1705 mkdir -p $$(dirname $$target)
1708 output_to_bindir = 1,
1717 "lib/Frontend/*.cpp",
1721 "include/clang/Frontend/*.h",
1723 copts = ["$(STACK_FRAME_UNLIMITED)"],
1724 data = [":builtin_headers_gen"],
1725 includes = ["include"],
1726 textual_hdrs = glob([
1727 "include/clang/Frontend/*.def",
1734 ":driver_options_inc_gen",
1740 ":static_analyzer_core_options",
1741 "//llvm:BinaryFormat",
1743 "//llvm:BitstreamReader",
1744 "//llvm:BitstreamWriter",
1746 "//llvm:FrontendDebug",
1750 "//llvm:ProfileData",
1754 "//llvm:TargetParser",
1760 name = "frontend_rewrite",
1762 "lib/Frontend/Rewrite/*.cpp",
1763 "lib/Frontend/Rewrite/*.h",
1765 hdrs = glob(["include/clang/Rewrite/Frontend/*.h"]),
1766 includes = ["include"],
1782 name = "interpreter",
1784 "lib/Interpreter/*.cpp",
1785 "lib/Interpreter/*.h",
1787 hdrs = glob(["include/clang/Interpreter/*.h"]),
1788 includes = ["include"],
1802 "//llvm:AllTargetsAsmParsers",
1803 "//llvm:AllTargetsCodeGens",
1805 "//llvm:ExecutionEngine",
1808 "//llvm:OrcDebugging",
1811 "//llvm:OrcTargetProcess",
1814 "//llvm:TargetParser",
1821 "lib/CodeGen/**/*.cpp",
1822 "lib/CodeGen/**/*.h",
1824 hdrs = glob(["include/clang/CodeGen/*.h"]),
1825 copts = ["$(STACK_FRAME_UNLIMITED)"],
1834 ":basic_arm_cde_cg_gen",
1835 ":basic_arm_sme_builtin_cg_gen",
1836 ":basic_arm_sve_builtin_cg_gen",
1837 ":basic_riscv_sifive_vector_builtin_cg_gen",
1838 ":basic_riscv_vector_builtin_cg_gen",
1844 "//llvm:AllTargetsAsmParsers",
1846 "//llvm:BinaryFormat",
1849 "//llvm:BitstreamReader",
1851 "//llvm:CodeGenTypes",
1853 "//llvm:Coroutines",
1855 "//llvm:DebugInfoDWARF",
1857 "//llvm:FrontendHLSL",
1858 "//llvm:FrontendOffloading",
1859 "//llvm:FrontendOpenMP",
1864 "//llvm:InstCombine",
1865 "//llvm:Instrumentation",
1872 "//llvm:ProfileData",
1876 "//llvm:TargetParser",
1877 "//llvm:TransformUtils",
1882 name = "static_analyzer_frontend",
1884 "lib/StaticAnalyzer/Frontend/**/*.cpp",
1885 "lib/StaticAnalyzer/Frontend/**/*.h",
1887 hdrs = glob(["include/clang/StaticAnalyzer/Frontend/**/*.h"]),
1888 includes = ["include"],
1899 ":static_analyzer_checkers",
1900 ":static_analyzer_core",
1908 name = "serialization_attr_gen",
1911 "-gen-clang-attr-pch-read",
1912 "include/clang/Serialization/AttrPCHRead.inc",
1915 "-gen-clang-attr-pch-write",
1916 "include/clang/Serialization/AttrPCHWrite.inc",
1919 tblgen = ":clang-tblgen",
1920 td_file = "include/clang/Basic/Attr.td",
1922 "include/clang/Basic/ASTNode.td",
1923 "include/clang/Basic/Attr.td",
1924 "include/clang/Basic/AttrDocs.td",
1925 "include/clang/Basic/DeclNodes.td",
1926 "include/clang/Basic/StmtNodes.td",
1933 "lib/Support/*.cpp",
1936 "include/clang/Support/*.h",
1938 includes = ["include"],
1945 name = "serialization",
1947 "include/clang/Serialization/AttrPCHRead.inc",
1948 "include/clang/Serialization/AttrPCHWrite.inc",
1950 "lib/Serialization/*.cpp",
1951 "lib/Serialization/*.h",
1954 "include/clang/Serialization/*.h",
1956 includes = ["include"],
1957 textual_hdrs = glob([
1958 "include/clang/Serialization/*.def",
1965 ":serialization_attr_gen",
1969 "//llvm:BitstreamReader",
1970 "//llvm:BitstreamWriter",
1971 "//llvm:FrontendOpenMP",
1973 "//llvm:TargetParser",
1978 name = "frontend_tool",
1980 "lib/FrontendTool/*.cpp",
1981 "lib/FrontendTool/*.h",
1983 hdrs = glob(["include/clang/FrontendTool/*.h"]),
1984 includes = ["include"],
1992 ":frontend_rewrite",
1993 ":static_analyzer_frontend",
2000 name = "arc_migrate",
2002 "lib/ARCMigrate/*.cpp",
2003 "lib/ARCMigrate/*.h",
2005 hdrs = glob(["include/clang/ARCMigrate/*.h"]),
2006 includes = ["include"],
2013 ":frontend_rewrite",
2019 ":static_analyzer_checkers",
2020 ":static_analyzer_core",
2022 "//llvm:TargetParser",
2027 name = "libclang_static",
2029 "tools/libclang/*.cpp",
2030 "tools/libclang/*.h",
2032 hdrs = glob(["include/clang-c/*.h"]),
2033 defines = ["CINDEX_NO_EXPORTS"],
2048 "//llvm:BitstreamReader",
2049 "//llvm:FrontendOpenMP",
2058 "tools/libclang/*.cpp",
2059 "tools/libclang/*.h",
2061 hdrs = glob(["include/clang-c/*.h"]),
2063 "@platforms//os:windows": ["-D_CINDEX_LIB_"],
2064 "//conditions:default": [],
2066 strip_include_prefix = "include",
2081 "//llvm:BitstreamReader",
2082 "//llvm:FrontendOpenMP",
2089 name = "python-sources",
2091 "bindings/python/clang/cindex.py",
2092 "bindings/python/clang/enumerations.py",
2097 name = "python-cindex-examples",
2099 "bindings/python/examples/cindex/cindex-dump.py",
2100 "bindings/python/examples/cindex/cindex-includes.py",
2105 name = "c-index-test",
2108 "tools/c-index-test/c-index-test.c",
2109 "tools/c-index-test/core_main.cpp",
2112 "-Wno-uninitialized",
2132 name = "arcmt-test",
2134 srcs = ["tools/arcmt-test/arcmt-test.cpp"],
2141 ":frontend_rewrite",
2148 name = "c-arcmt-test",
2150 srcs = ["tools/c-arcmt-test/c-arcmt-test.c"],
2152 "@platforms//os:windows": [],
2153 "//conditions:default": ["-std=gnu99"],
2165 name = "clang-import-test",
2168 "tools/clang-import-test/*.cpp",
2169 "tools/clang-import-test/*.h",
2182 "//llvm:TargetParser",
2187 name = "clang_main",
2188 out = "clang-driver.cpp",
2190 "@TOOL_NAME@": "clang",
2192 template = "//llvm:cmake/modules/llvm-driver-template.cpp.in",
2196 name = "clang-driver",
2198 "tools/driver/*.cpp",
2200 ]) + ["clang-driver.cpp"],
2202 # Disable stack frame size checks in the driver because
2203 # clang::ensureStackAddressSpace allocates a large array on the stack.
2204 "$(STACK_FRAME_UNLIMITED)",
2214 ":frontend_rewrite",
2220 ":static_analyzer_frontend",
2221 "//llvm:AllTargetsAsmParsers",
2222 "//llvm:AllTargetsCodeGens",
2233 "//llvm:TargetParser",
2250 "tools/diagtool/*.cpp",
2251 "tools/diagtool/*.h",
2264 name = "exploded_graph_rewriter",
2266 data = ["utils/analyzer/exploded-graph-rewriter.py"],
2270 name = "module-deps-to-rsp",
2272 data = ["utils/module-deps-to-rsp.py"],
2278 data = ["utils/hmaptool/hmaptool"],
2287 name = "clang-check",
2288 srcs = ["tools/clang-check/ClangCheck.cpp"],
2295 ":frontend_rewrite",
2297 ":static_analyzer_frontend",
2306 name = "clang-format",
2308 "tools/clang-format/ClangFormat.cpp",
2321 name = "clang-diff",
2322 srcs = glob(["tools/clang-diff/*.cpp"]),
2332 name = "clang-offload-bundler",
2333 srcs = glob(["tools/clang-offload-bundler/*.cpp"]),
2343 "//llvm:TargetParser",
2348 name = "clang-offload-packager",
2349 srcs = glob(["tools/clang-offload-packager/*.cpp"]),
2353 "//llvm:BinaryFormat",
2360 name = "linker_wrapper_opts_gen",
2362 "-gen-opt-parser-defs",
2363 "tools/clang-linker-wrapper/LinkerWrapperOpts.inc",
2365 tblgen = "//llvm:llvm-tblgen",
2366 td_file = "tools/clang-linker-wrapper/LinkerWrapperOpts.td",
2368 "tools/clang-linker-wrapper/LinkerWrapperOpts.td",
2369 "//llvm:include/llvm/Option/OptParser.td",
2374 name = "clang-linker-wrapper",
2376 "tools/clang-linker-wrapper/ClangLinkerWrapper.cpp",
2377 "tools/clang-linker-wrapper/OffloadWrapper.cpp",
2378 "tools/clang-linker-wrapper/OffloadWrapper.h",
2381 "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/tools/clang-linker-wrapper",
2389 ":linker_wrapper_opts_gen",
2390 "//llvm:AllTargetsAsmParsers",
2392 "//llvm:BinaryFormat",
2404 "//llvm:TargetParser",
2405 "//llvm:TransformUtils",
2410 name = "clang-refactor",
2412 "tools/clang-refactor/*.cpp",
2413 "tools/clang-refactor/*.h",
2424 ":tooling_refactoring",
2430 name = "clang-rename",
2431 srcs = glob(["tools/clang-rename/*.cpp"]),
2438 ":tooling_refactoring",
2444 name = "clang-repl",
2445 srcs = glob(["tools/clang-repl/*.cpp"]),
2453 "//llvm:LineEditor",
2461 name = "clang-extdef-mapping",
2462 srcs = glob(["tools/clang-extdef-mapping/*.cpp"]),
2475 name = "ScanDepsTableGen",
2476 strip_include_prefix = "tools/clang-scan-deps",
2478 "-gen-opt-parser-defs",
2479 "tools/clang-scan-deps/Opts.inc",
2481 tblgen = "//llvm:llvm-tblgen",
2482 td_file = "tools/clang-scan-deps/Opts.td",
2483 td_srcs = ["//llvm:include/llvm/Option/OptParser.td"],
2487 name = "clang-scan-deps-main",
2488 out = "clang-scan-deps-driver.cpp",
2490 "@TOOL_NAME@": "clang_scan_deps",
2492 template = "//llvm:cmake/modules/llvm-driver-template.cpp.in",
2496 name = "clang-scan-deps",
2497 srcs = glob(["tools/clang-scan-deps/*.cpp"]) + ["clang-scan-deps-driver.cpp"],
2500 ":ScanDepsTableGen",
2504 ":tooling_dependency_scanning",
2506 "//llvm:TargetParser",
2511 name = "extract_api",
2513 "lib/ExtractAPI/**/*.cpp",
2514 "lib/ExtractAPI/**/*.h",
2516 hdrs = glob(["include/clang/ExtractAPI/**/*.h"]),
2517 includes = ["include"],
2526 "//llvm:TargetParser",