Skip to content

Commit 1c9d5c6

Browse files
committed
[Bazel] Support opt-driver library, like clang-driver
1 parent 43531e7 commit 1c9d5c6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4808,8 +4808,8 @@ cc_binary(
48084808
],
48094809
)
48104810

4811-
cc_binary(
4812-
name = "opt",
4811+
cc_library(
4812+
name = "opt-driver",
48134813
srcs = glob([
48144814
"tools/opt/*.cpp",
48154815
"tools/opt/*.h",
@@ -4820,7 +4820,6 @@ cc_binary(
48204820
"@platforms//os:macos": [],
48214821
"//conditions:default": ["-Wl,--export-dynamic"],
48224822
}),
4823-
stamp = 0,
48244823
deps = [
48254824
":AllTargetsAsmParsers",
48264825
":AllTargetsCodeGens",
@@ -4847,6 +4846,12 @@ cc_binary(
48474846
],
48484847
)
48494848

4849+
cc_binary(
4850+
name = "opt",
4851+
stamp = 0,
4852+
deps = [":opt-driver"]
4853+
)
4854+
48504855
gentbl(
48514856
name = "SancovOptsTableGen",
48524857
strip_include_prefix = "tools/sancov",

0 commit comments

Comments
 (0)