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

Ensure the Gazelle binary is built for the right platform #1803

Merged
merged 1 commit into from
May 16, 2024

Conversation

EdSchouten
Copy link
Contributor

What type of PR is this?

Bug fix

What package or component does this PR mostly affect?

cmd/gazelle

What does this PR do? Why is it needed?

Right now we pick Gazelle for the "exec" platform. This isn't correct, because we are not running Gazelle as part of a build action. Instead, we are emitting a shell script that invokes Gazelle. That's why we need to make sure it's built for the target platform.

This addresses an issue where Bazel ends up invoking a copy of Gazelle for Linux on my Mac, if I invoke bazel with
--extra_execution_platforms=//my_linux_platform,//my_mac_platform.

Which issues(s) does this PR fix?

n/a

Other notes for review

Right now we pick Gazelle for the "exec" platform. This isn't correct,
because we are not running Gazelle as part of a build action. Instead,
we are emitting a shell script that *invokes* Gazelle. That's why we
need to make sure it's built for the target platform.

This addresses an issue where Bazel ends up invoking a copy of Gazelle
for Linux on my Mac, if I invoke bazel with
--extra_execution_platforms=//my_linux_platform,//my_mac_platform.
@fmeum
Copy link
Collaborator

fmeum commented May 16, 2024

Thanks!

@fmeum fmeum merged commit f93e45f into bazelbuild:master May 16, 2024
15 checks passed
@EdSchouten EdSchouten deleted the eschouten/20240516-cfg-target branch May 16, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants