Skip to content

Commit

Permalink
Fix "-arch arm64" flag for aarch64-ios-sim (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
gh2o committed Jan 19, 2023
1 parent 621ba2c commit cf0a78b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ impl Build {
}
} else if is_sim {
match arch {
"arm64" | "aarch64" => ArchSpec::Simulator("-arch arm64"),
"arm64" | "aarch64" => ArchSpec::Simulator("arm64"),
"x86_64" => ArchSpec::Simulator("-m64"),
_ => {
return Err(Error::new(
Expand Down Expand Up @@ -2262,7 +2262,13 @@ impl Build {
format!("{}os", sdk_prefix)
}
ArchSpec::Simulator(arch) => {
cmd.args.push(arch.into());
if arch.starts_with('-') {
// -m32 or -m64
cmd.args.push(arch.into());
} else {
cmd.args.push("-arch".into());
cmd.args.push(arch.into());
}
cmd.args
.push(format!("-m{}simulator-version-min={}", sim_prefix, min_version).into());
format!("{}simulator", sdk_prefix)
Expand Down

0 comments on commit cf0a78b

Please sign in to comment.