You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cc_args.format attribute can do this today, and can handle expansion of directory rules from bazel_skylib as well as files and cc_variables. I don't think there's a significant reason to not support this though.
Putting a file in cc_args.format doesn't work because the format argument is missing allow_files = True. As a workaround, the file can be wrapped in a filegroup:
filegroup(
name = "example",
srcs = ["example.txt"],
)
cc_args(
name = "default_flags",
actions = ["@rules_cc//cc/toolchains/actions:compile_actions"],
args = [
"--example={example}",
],
format = {"example": ":example"},
data = [":example"],
)
I wrote a args rule like this:
Which I think we should be able to support
The text was updated successfully, but these errors were encountered: