Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5671,6 +5671,57 @@ cc_binary(
],
)

cc_binary(
name = "llvm-sim",
testonly = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these tools really just for tests? They seem more like general purpose utils, which happen to be useful for tests.

OTOH, there's not too much harm in marking this testonly. I'd be fine adding them like this and then removing the testonly attr later if we need to use it outside of a testing context.

Copy link
Member Author

@HighW4y2H3ll HighW4y2H3ll Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! llvm-sim is added because it's configured in the lit.cfg.py:

"llvm-sim",
The lit is throwing out a warning if the binary does not exists. :)

srcs = glob([
"tools/llvm-sim/*.cpp",
]),
copts = llvm_copts,
stamp = 0,
deps = [
":Analysis",
":Core",
":IRReader",
":Support",
":config",
],
)

cc_binary(
name = "llvm-ir2vec",
testonly = True,
srcs = glob([
"tools/llvm-ir2vec/*.cpp",
]),
copts = llvm_copts,
stamp = 0,
deps = [
":Analysis",
":Core",
":IRReader",
":Support",
":config",
],
)

cc_binary(
name = "llvm-ctxprof-util",
testonly = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit description in a737b87 explicitly describes this as a test tool, so this one is definitely OK.

srcs = glob([
"tools/llvm-ctxprof-util/*.cpp",
]),
copts = llvm_copts,
stamp = 0,
deps = [
":Core",
":Object",
":ProfileData",
":Support",
":config",
],
)

cc_binary(
name = "obj2yaml",
testonly = True,
Expand Down
Loading