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

Bazelisk pulls incorrect Bazel on Windows ARM64 #572

Closed
jxy-s opened this issue Apr 28, 2024 · 3 comments · Fixed by #601
Closed

Bazelisk pulls incorrect Bazel on Windows ARM64 #572

jxy-s opened this issue Apr 28, 2024 · 3 comments · Fixed by #601
Labels
help wanted Needs help from external contributors P2 We'll consider working on this in future. (Assignee optional)

Comments

@jxy-s
Copy link

jxy-s commented Apr 28, 2024

The x64 version of bazelisk is compatible with a Windows ARM64 machine, it will run under x64 emulation on Windows. However it ends up pulling the x64 version of Bazel which causes unintended downstream behavior.

  • toolchains are not resolved as expected
  • the host OS is not reflected correctly causing the default compilation to produce an x64 binary instead of an ARM64 one

Bazelisk should pull the ARM64 version of when running on Windows ARM64 instead of the x64 version.

See: bazelbuild/bazel#22164 (comment)

@meteorcloudy
Copy link
Member

This is probably because we don't have windows arm64 binary for bazelisk itself. @fweikert Do you know how hard it would be to add? We cross-compile all binaries with the go toolchain anyway, right?

@meteorcloudy
Copy link
Member

Maybe it's as simple as adding another target for windows arm64 here?

bazelisk/BUILD

Lines 145 to 153 in 47f6047

go_binary(
name = "bazelisk-windows-amd64",
out = "bazelisk-windows_amd64.exe",
embed = [":go_default_library"],
goarch = "amd64",
goos = "windows",
pure = "on",
visibility = ["//visibility:public"],
)

@meteorcloudy meteorcloudy added help wanted Needs help from external contributors P2 We'll consider working on this in future. (Assignee optional) labels Jul 9, 2024
@albertocavalcante
Copy link
Contributor

@meteorcloudy my understanding is the same. I will try to submit a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs help from external contributors P2 We'll consider working on this in future. (Assignee optional)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants