Skip to content

Commit 2d8cfac

Browse files
committed
Create separate XCFramework for Intel and M1 Macs
1 parent 715d204 commit 2d8cfac

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,23 @@ jobs:
4646
- name: Extract artifacts
4747
run: find . -name "*.tar.xz" -exec tar xzf {} \;
4848

49-
- name: Create XCFramework
49+
- name: Create XCFramework for Intel Macs
5050
run: source build-llvm.sh && create_xcframework iphoneos iphonesimulator maccatalyst
51-
- run: tar -cJf LLVM.xcframework.tar.xz LLVM.xcframework
51+
- run: tar -cJf LLVM_Intel.xcframework.tar.xz LLVM.xcframework
5252
- uses: actions/upload-artifact@v3
5353
with:
54-
name: LLVM.xcframework
55-
path: LLVM.xcframework.tar.xz
54+
name: LLVM_Intel
55+
path: LLVM_Intel.xcframework.tar.xz
56+
5657
- uses: actions/upload-artifact@v3
5758
with:
5859
name: libclang
5960
path: libclang.tar.xz
61+
62+
- name: Create XCFramework for M1 Macs
63+
run: source build-llvm.sh && rm -rf LLVM.xcframework && create_xcframework iphoneos iphonesimulator-arm64 maccatalyst-arm64
64+
- run: tar -cJf LLVM_M1.xcframework.tar.xz LLVM.xcframework
65+
- uses: actions/upload-artifact@v3
66+
with:
67+
name: LLVM_M1
68+
path: LLVM_M1.xcframework.tar.xz

build-llvm.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ create_xcframework() {
236236
local xcframeworkSupportedBasePlatforms=("$@")
237237

238238
# Merge applicable platforms
239-
for p in "${xcframeworkSupportedBasePlatforms[@]}"; do
240-
if [ "$p" != "iphoneos" ]; then
241-
merge_archs $p
242-
fi
243-
done
239+
#for p in "${xcframeworkSupportedBasePlatforms[@]}"; do
240+
# if [ "$p" != "iphoneos" ]; then
241+
# merge_archs $p
242+
# fi
243+
#done
244244

245245
# Construct xcodebuild arguments
246246
local xcodebuildCreateXCFArgs=()

0 commit comments

Comments
 (0)