Skip to content

Commit ae68934

Browse files
authored
Pick version for iOS simulator target (#582)
1 parent cda115a commit ae68934

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,20 @@ impl Build {
14681468
cmd.args
14691469
.push(format!("--target={}-apple-{}-macabi", arch, ios).into());
14701470
}
1471+
} else if target.contains("ios-sim") {
1472+
if let Some(arch) =
1473+
map_darwin_target_from_rust_to_compiler_architecture(target)
1474+
{
1475+
let deployment_target = env::var("IPHONEOS_DEPLOYMENT_TARGET")
1476+
.unwrap_or_else(|_| "7.0".into());
1477+
cmd.args.push(
1478+
format!(
1479+
"--target={}-apple-ios{}-simulator",
1480+
arch, deployment_target
1481+
)
1482+
.into(),
1483+
);
1484+
}
14711485
} else {
14721486
cmd.args.push(format!("--target={}", target).into());
14731487
}

0 commit comments

Comments
 (0)