add conditional build on platform

This commit is contained in:
Francisco Gindre 2020-09-23 18:22:25 -03:00
parent 49e3300692
commit 9ee7b69f64
1 changed files with 10 additions and 2 deletions

View File

@ -34,10 +34,18 @@ fi
echo "Building Rust backend"
echo ""
echo "cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml $FEATURE_FLAGS --release"
echo "platform name"
echo $PLATFORM_NAME
if [ $PLATFORM_NAME = "iphonesimulator" ]; then
ZCASH_ACTIVE_ARCHITECTURE="x86_64-apple-ios"
else
ZCASH_ACTIVE_ARCHITECTURE="aarch64-apple-ios"
fi
echo "cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml $FEATURE_FLAGS --targets $ZCASH_ACTIVE_ARCHITECTURE --release"
if [ ! -f ${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME} ]; then
cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml $FEATURE_FLAGS --release
cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml $FEATURE_FLAGS --targets $ZCASH_ACTIVE_ARCHITECTURE --release
persist_environment
fi