Skip to content

Commit

Permalink
Fix missing macos arm64 in fat binary (#2886)
Browse files Browse the repository at this point in the history
* Add arm64 layer to fat binary

* Add changelog
  • Loading branch information
gememma authored Oct 30, 2024
1 parent 9dd320e commit 02c758c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: create universal target dir
run: mkdir -p /tmp/target/universal-apple-darwin/release
- name: create universal dylib
run: lipo -create -output /tmp/target/universal-apple-darwin/release/libmirrord_layer.dylib target/aarch64-apple-darwin/release/shim.dylib target/x86_64-apple-darwin/release/libmirrord_layer.dylib
run: lipo -create -output /tmp/target/universal-apple-darwin/release/libmirrord_layer.dylib target/aarch64-apple-darwin/release/shim.dylib target/aarch64-apple-darwin/release/libmirrord_layer.dylib target/x86_64-apple-darwin/release/libmirrord_layer.dylib
- name: Sign layer universal
env:
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER }}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/2885.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add arm64 layer to macOS fat binary.
4 changes: 2 additions & 2 deletions scripts/build_fat_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ mkdir -p target/universal-apple-darwin/debug
clang -arch arm64e -dynamiclib -o target/universal-apple-darwin/debug/shim.dylib mirrord/layer/shim.c
codesign -f -s - target/universal-apple-darwin/debug/shim.dylib

# Create universal binary for mirrord-layer from x86 and shim
lipo -create -output target/universal-apple-darwin/debug/libmirrord_layer.dylib target/x86_64-apple-darwin/debug/libmirrord_layer.dylib target/universal-apple-darwin/debug/shim.dylib
# Create universal binary for mirrord-layer from x86 and shim, as well as arm64
lipo -create -output target/universal-apple-darwin/debug/libmirrord_layer.dylib target/x86_64-apple-darwin/debug/libmirrord_layer.dylib target/universal-apple-darwin/debug/shim.dylib target/aarch64-apple-darwin/debug/libmirrord_layer.dylib
codesign -f -s - target/universal-apple-darwin/debug/libmirrord_layer.dylib

# build mirrord package - aarch64-apple-darwin target requires MIRRORD_LAYER_FILE_MACOS_ARM64 var
Expand Down

0 comments on commit 02c758c

Please sign in to comment.