summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormojganii <mojgan.jelodar@codic.se>2024-09-30 17:07:58 +0200
committermojganii <mojgan.jelodar@codic.se>2024-10-01 17:15:19 +0200
commit1912885d291939947fe608bc9c44cc3e0b5e0d53 (patch)
tree3379e5a835edc5c30e8e4ccc4f5eeaf00c260fd1
parentfa641713ae50f8f6180230f2866a12ac17836fd3 (diff)
downloadmullvadvpn-1912885d291939947fe608bc9c44cc3e0b5e0d53.tar.xz
mullvadvpn-1912885d291939947fe608bc9c44cc3e0b5e0d53.zip
Drop x86_64
-rw-r--r--ios/BuildInstructions.md5
-rw-r--r--ios/MullvadVPNUITests/Screenshots/SnapshotHelper.swift2
-rw-r--r--ios/build-rust-library.sh13
3 files changed, 4 insertions, 16 deletions
diff --git a/ios/BuildInstructions.md b/ios/BuildInstructions.md
index fcc7178e04..7900b7117f 100644
--- a/ios/BuildInstructions.md
+++ b/ios/BuildInstructions.md
@@ -10,10 +10,9 @@ Rust should be installed via [rustup](https://rustup.rs). Once rust is
installed, do not forget to install the iOS targets:
```bash
-rustup target install aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
+rustup target install aarch64-apple-ios aarch64-apple-ios-sim
```
-Pick between the ARM or x86 simulator targets, selecting the one that matches
-the host system.
+You only need to install the ARM simulator target, which matches the current Apple Silicon architecture.
Once both rust and go are installed, ensure they are available in your path.
diff --git a/ios/MullvadVPNUITests/Screenshots/SnapshotHelper.swift b/ios/MullvadVPNUITests/Screenshots/SnapshotHelper.swift
index afa9d01bc9..1a0238de6d 100644
--- a/ios/MullvadVPNUITests/Screenshots/SnapshotHelper.swift
+++ b/ios/MullvadVPNUITests/Screenshots/SnapshotHelper.swift
@@ -244,7 +244,7 @@ open class Snapshot: NSObject {
#if os(OSX)
let homeDir = URL(fileURLWithPath: NSHomeDirectory())
return homeDir.appendingPathComponent(cachePath)
- #elseif arch(i386) || arch(x86_64) || arch(arm64)
+ #elseif arch(arm64)
guard let simulatorHostHome = ProcessInfo().environment["SIMULATOR_HOST_HOME"] else {
throw SnapshotError.cannotFindSimulatorHomeDirectory
}
diff --git a/ios/build-rust-library.sh b/ios/build-rust-library.sh
index 94b8571a78..3b0a6675e7 100644
--- a/ios/build-rust-library.sh
+++ b/ios/build-rust-library.sh
@@ -51,24 +51,13 @@ fi
for arch in $ARCHS; do
case "$arch" in
- x86_64)
- if [ $IS_SIMULATOR -eq 0 ]; then
- echo "Building for x86_64, but not a simulator build. What's going on?" >&2
- exit 2
- fi
-
- # Intel iOS simulator
- export CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios"
- "$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib $RELFLAG --target x86_64-apple-ios ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
- "$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib --target x86_64-apple-ios ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
- ;;
-
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 --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 --target aarch64-apple-ios-sim ${FEATURE_FLAGS:+--features "$FEATURE_FLAGS"}
fi