Skip to content

Commit 76b3c24

Browse files
EdSchoutencopybara-github
authored andcommitted
Build xcode-locator as a universal binary
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. Closes #14168. PiperOrigin-RevId: 412864310
1 parent cd4bc7c commit 76b3c24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/osx/BUILD

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ exports_files([
2929

3030
DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
3131
/usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices \
32-
-framework Foundation -o $@ $<
32+
-framework Foundation -arch arm64 -arch x86_64 -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \
33+
env -i codesign --identifier $@ --force --sign - $@
3334
"""
3435

3536
genrule(

0 commit comments

Comments
 (0)