bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
108 stars 71 forks source link

Make aarch64 an alias of arm64 #22

Closed thii closed 3 years ago

thii commented 3 years ago

On Apple silicon Macs, auto-detected host platform constraints' cpu is aarch64, but arm64 is used everywhere else. This change ensures that you will get the same cpu when your target depends on an arm64 or an aarch64 cpu contraint.

comius commented 3 years ago

cc @katre, @philwo

katre commented 3 years ago

Are these actually the same CPU? I don't know anything about ARM chips. Should we possibly be distinguishing Apple's M1 from other 64-bit ARM chips?

thii commented 3 years ago

On Apple platforms, I think they refer to the same cpu, not sure about others.

Or we can fix the autodetecting toolchain on macOS to use arm64 instead of aarch64.

katre commented 3 years ago

I'm trying to get some clarification on the details of different ARM cpus from some of my colleagues, and I'll report back once I have something.

katre commented 3 years ago

Thanks for your patience. I talked to my colleagues, and this PR makes sense. Once this and #11 are in we may need to do another pass to rationalize arm cpus, but this can submit as is. I'll work on merging it today.

byronyi commented 3 years ago

Gentle ping @katre

katre commented 3 years ago

This should be in release https://github.com/bazelbuild/platforms/releases/tag/0.0.4, sorry I didn't comment back here that it was done.