rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

Add aarch64 to prebuild library constraints for macos

Open dmeijboom opened this issue 1 year ago • 0 comments

At least since Ninja 1.10.2 the macos binaries are actually universal binaries which means that they support both x86_64 as well as aarch64. I tested all versions manually to make sure we only mark ninja binaries as universal binaries when it's build for both architectures.

See:

➜ file ~/Downloads/ninja
/Users/dmeijboom/Downloads/ninja: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
~/Downloads/ninja (for architecture x86_64):     Mach-O 64-bit executable x86_64
~/Downloads/ninja (for architecture arm64):      Mach-O 64-bit executable arm64

This PR adds a new target mac_aarch64 which contains the same artifact as x86_64 where the CPU constraint is changed to aarch64.

Tested and seems to work just fine.

dmeijboom avatar Feb 23 '24 17:02 dmeijboom