Skip to content

Commit c4c2fc5

Browse files
committed
build them all
1 parent 4df8c6d commit c4c2fc5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

bindings/apple/build_xcframework.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,30 @@ mkdir -p ${GENERATED_DIR}
1313

1414
REL_FLAG="--release"
1515
REL_TYPE_DIR="release"
16+
BUILD_FLAGS="+nightly build -Zbuild-std=std,panic_abort -Z build-std-features=panic_immediate_abort"
1617

1718
# Build static libs for all the different architectures
1819

1920
# iOS
2021
echo -e "Building for iOS [1/5]"
21-
cargo +nightly build -Zbuild-std=std,panic_abort -Z build-std-features=panic_immediate_abort -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-ios"
22+
cargo ${BUILD_FLAGS} -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-ios"
2223

2324
# MacOS
2425
echo -e "\nBuilding for macOS (Apple Silicon) [2/5]"
25-
cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-darwin"
26+
cargo ${BUILD_FLAGS} -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-darwin"
2627
echo -e "\nBuilding for macOS (Intel) [3/5]"
27-
cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "x86_64-apple-darwin"
28+
cargo ${BUILD_FLAGS} -p matrix-sdk-ffi ${REL_FLAG} --target "x86_64-apple-darwin"
2829

2930
# iOS Simulator
3031
echo -e "\nBuilding for iOS Simulator (Apple Silicon) [4/5]"
31-
cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-ios-sim"
32+
cargo $BUILD_FLAGS -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-ios-sim"
3233
echo -e "\nBuilding for iOS Simulator (Intel) [5/5]"
33-
cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "x86_64-apple-ios"
34+
cargo $BUILD_FLAGS -p matrix-sdk-ffi ${REL_FLAG} --target "x86_64-apple-ios"
3435

3536
echo -e "\nCreating XCFramework"
3637
# Lipo together the libraries for the same platform
3738

38-
# MacOS
39+
# # MacOS
3940
lipo -create \
4041
"${TARGET_DIR}/x86_64-apple-darwin/${REL_TYPE_DIR}/libmatrix_sdk_ffi.a" \
4142
"${TARGET_DIR}/aarch64-apple-darwin/${REL_TYPE_DIR}/libmatrix_sdk_ffi.a" \

0 commit comments

Comments
 (0)