@@ -13,29 +13,30 @@ mkdir -p ${GENERATED_DIR}
13
13
14
14
REL_FLAG=" --release"
15
15
REL_TYPE_DIR=" release"
16
+ BUILD_FLAGS=" +nightly build -Zbuild-std=std,panic_abort -Z build-std-features=panic_immediate_abort"
16
17
17
18
# Build static libs for all the different architectures
18
19
19
20
# iOS
20
21
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"
22
23
23
24
# MacOS
24
25
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"
26
27
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"
28
29
29
30
# iOS Simulator
30
31
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"
32
33
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"
34
35
35
36
echo -e " \nCreating XCFramework"
36
37
# Lipo together the libraries for the same platform
37
38
38
- # MacOS
39
+ # # MacOS
39
40
lipo -create \
40
41
" ${TARGET_DIR} /x86_64-apple-darwin/${REL_TYPE_DIR} /libmatrix_sdk_ffi.a" \
41
42
" ${TARGET_DIR} /aarch64-apple-darwin/${REL_TYPE_DIR} /libmatrix_sdk_ffi.a" \
0 commit comments