Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5.x] Compile Apple tools as fat binaries if possible
The Apple toolchain has 2 native binaries that are inputs to every single action. Because of this if you want to share caches between Apple Silicon machines and Intel machines, you either need to force them to be x86_64 binaries and suffer the performance loss on Apple Silicon machiens, or use fat binaries so the sha's match on both architectures, which is what this change does. These binaries are so small that the size impact of this doesn't matter. Since Apple Silicon support requires Xcode 12 this falls back to compiling the single architecture binary if it fails, under the assumption that means you're on Xcode 11 or lower. We don't have a better indication at this point of what Xcode version you're using, so this seems like a fine workaround until Xcode 12 is the minimum supported version. Closes bazelbuild#13452. PiperOrigin-RevId: 405842940 (cherry picked from commit 80c56ff)
- Loading branch information