Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append --locked when building Rust libraries for iOS for releases #7522

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ios/build-rust-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ echo ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
fi


RELFLAG=
CARGO_ARGS=()
if [[ "$CONFIGURATION" == "Release" ]]; then
RELFLAG=--release
CARGO_ARGS+=(--release --locked)
fi
if [[ "$CONFIGURATION" == "MockRelease" ]]; then
RELFLAG=--release
CARGO_ARGS+=(--release --locked)
fi

# For whatever reason, Xcode includes its toolchain paths in the PATH variable such as
Expand All @@ -54,11 +54,11 @@ for arch in $ARCHS; do
arm64)
if [ $IS_SIMULATOR -eq 0 ]; then
# Hardware iOS targets
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib $RELFLAG --target aarch64-apple-ios ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib "${CARGO_ARGS[@]}" --target aarch64-apple-ios ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib --target aarch64-apple-ios ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
else
# iOS Simulator targets for arm64
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib $RELFLAG --target aarch64-apple-ios-sim ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib "${CARGO_ARGS[@]}" --target aarch64-apple-ios-sim ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib --target aarch64-apple-ios-sim ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
fi
esac
Expand Down
Loading