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

Go Bazelisk Binary Does Not Respect "arch --arch arm64" #509

Open
EdbertChan opened this issue Oct 20, 2023 · 0 comments
Open

Go Bazelisk Binary Does Not Respect "arch --arch arm64" #509

EdbertChan opened this issue Oct 20, 2023 · 0 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) type:bug Something isn't working

Comments

@EdbertChan
Copy link

When using M1 Macs, if Rosetta is enabled, we need to prepend the command "arch --arch arm64" to force a launch of an arm64 process. The use case is to build a proper arm64 Bazel binary.

However, if we build Bazel itself using Bazelisk, we will get an improper binary that is built not for arm64 as shown by the file command:

file
Mach-O 64-bit executable x86_64

To get around this, we've had to use the Python wrapper. But because this is explicitly called out as legacy code, we'd like to not have to do this.

Hash: cf1205e

Reproduction steps

  1. Build the Bazel repo with bazelisk
    arch --arch arm64 bazelisk build //src:bazel

  2. Validate the output using file
    file bazel-bin/src/bazel

  3. Make sure that the output has:
    Mach-O 64-bit executable arm64

@fweikert fweikert added the type:bug Something isn't working label Jan 19, 2024
@fweikert fweikert added the P2 We'll consider working on this in future. (Assignee optional) label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants