Support 'bazel run //examples:sieve' (#4185)

#4076 changed the rule setup and incidentally stopped supporting `bazel
run`. This should make `bazel run` work again.
This commit is contained in:
Jon Ross-Perkins
2024-08-04 03:00:40 +00:00
committed by GitHub
parent b3fcaf9969
commit d9a550a7d5
+2 -1
View File
@@ -58,7 +58,7 @@ def _carbon_binary_impl(ctx):
mnemonic = "CarbonLink",
progress_message = "Linking " + bin.short_path,
)
return [DefaultInfo(files = depset([bin]))]
return [DefaultInfo(files = depset([bin]), executable = bin)]
_carbon_binary_internal = rule(
implementation = _carbon_binary_impl,
@@ -92,6 +92,7 @@ _carbon_binary_internal = rule(
),
"srcs": attr.label_list(allow_files = [".carbon"]),
},
executable = True,
)
def carbon_binary(name, srcs):