Skip to content

Commit

Permalink
Build xcode-locator as a universal binary
Browse files Browse the repository at this point in the history
One of Buildbarn's users is attempting to build it on a Mac M1 system
that does not have Rosetta installed:

buildbarn/bb-remote-execution#89

This currently fails with the following error message:

    ERROR: <storage>/external/com_google_protobuf/BUILD:130:11: Compiling src/google/protobuf/extension_set.cc failed: I/O exception during sandboxed execution: com.google.devtools.build.lib.shell.ExecFailedException: java.io.IOException: Cannot run program "<tmp>/install/71ed47cad951a20fff87381f54639763/xcode-locator": error=86, Bad CPU type in executable

Let's address this by shipping a copy of xcode-locator that is built
both for ARM64 and x86-64.
  • Loading branch information
EdSchouten committed Oct 26, 2021
1 parent 8d66a41 commit 980ab9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/osx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports_files([

DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
/usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices \
-framework Foundation -o $@ $<
-framework Foundation -arch arm64 -arch x86_64 -o $@ $<
"""

genrule(
Expand Down

0 comments on commit 980ab9e

Please sign in to comment.