Skip to content

Commit

Permalink
Fix bug with x86 watchOS simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
simlay authored and kali committed Feb 22, 2024
1 parent a6115e0 commit 121354f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ then
if [ "$(uname -m)" = "arm64" ]; then
tests_sequence_unstable_target ${TV_SIM_ID} auto-tvos-aarch64-sim
else
# The x86 tvOS simulator tripple does not end in -sim.
tests_sequence_unstable_target ${TV_SIM_ID} auto-tvos-x86_64
fi
xcrun simctl delete $TV_SIM_ID
Expand All @@ -183,7 +184,7 @@ then
if [ "$(uname -m)" = "arm64" ]; then
tests_sequence_unstable_target ${WATCHOS_SIM_ID} auto-watchos-aarch64-sim
else
tests_sequence_unstable_target ${WATCHOS_SIM_ID} auto-watchos-x86_64
tests_sequence_unstable_target ${WATCHOS_SIM_ID} auto-watchos-x86_64-sim
fi
xcrun simctl delete $WATCHOS_SIM_ID
rustup default stable
Expand Down
11 changes: 8 additions & 3 deletions dinghy-lib/src/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,15 @@ impl PlatformManager for WatchosManager {
.iter()
.map(|arch| {
let id = format!("auto-watchos-{}", arch);
let rustc_triple = if *arch != "aarch64-sim" {
format!("{}-apple-watchos", arch)
} else {

// Apple watch simulator targets are x86_64-apple-watchos-sim or
// aarch64-apple-watchos-sim
let rustc_triple = if *arch == "aarch64-sim" {
format!("aarch64-apple-watchos-sim")
} else if *arch == "x86_64-sim" {
format!("x86_64-apple-watchos-sim")
} else {
format!("{}-apple-watchos", arch)
};
let simulator = if *arch == "x86_64-sim" || *arch == "aarch64-sim" {
Some(AppleSimulatorType::Watchos)
Expand Down

0 comments on commit 121354f

Please sign in to comment.