Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make exec cfg check for //go stricter #3867

Merged
merged 1 commit into from
Feb 15, 2024
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
2 changes: 1 addition & 1 deletion go/private/rules/go_bin_for_host.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _ensure_target_cfg(ctx):
# A target is assumed to be built in the target configuration if it is neither in the exec nor
# the host configuration (the latter has been removed in Bazel 6). Since there is no API for
# this, use the output directory to determine the configuration, which is a common pattern.
if "-exec-" in ctx.bin_dir.path or "/host/" in ctx.bin_dir.path:
if "-exec" in ctx.bin_dir.path or "/host/" in ctx.bin_dir.path:
fail("//go is only meant to be used with 'bazel run', not as a tool. " +
"If you need to use it as a tool (e.g. in a genrule), please " +
"open an issue at " +
Expand Down
Loading