Skip to content

Commit 087c832

Browse files
authored
[bazel] Port #155026: OptTable support for subcommands (#162150)
1 parent 6b26dd5 commit 087c832

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ cc_binary(
770770
stamp = 0,
771771
deps = [
772772
":CodeGenTypes",
773+
":Option",
773774
":Support",
774775
":TableGen",
775776
":TableGenGlobalISel",

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,15 @@ gentbl_cc_library(
650650
deps = ["//llvm:OptParserTdFiles"],
651651
)
652652

653+
gentbl_cc_library(
654+
name = "sub_command_opts_tests_gen",
655+
strip_include_prefix = "Option",
656+
tbl_outs = {"Option/SubCommandOpts.inc": ["-gen-opt-parser-defs"]},
657+
tblgen = "//llvm:llvm-tblgen",
658+
td_file = "Option/SubCommandOpts.td",
659+
deps = ["//llvm:OptParserTdFiles"],
660+
)
661+
653662
gentbl_cc_library(
654663
name = "automata_gen",
655664
strip_include_prefix = "TableGen",
@@ -671,6 +680,7 @@ cc_test(
671680
),
672681
deps = [
673682
":option_tests_gen",
683+
":sub_command_opts_tests_gen",
674684
"//llvm:Option",
675685
"//llvm:Support",
676686
"//third-party/unittest:gtest",

0 commit comments

Comments
 (0)