Skip to content

Commit

Permalink
Merge pull request #6 from 0rvar/orvar/support-m1
Browse files Browse the repository at this point in the history
Use proper swift target during linking for m1 macs
  • Loading branch information
Brendonovich authored Mar 23, 2022
2 parents 729bdb5 + e983a27 commit 5b2f18e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src-rs/build_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ pub struct SwiftTarget {
const MACOS_TARGET_VERSION: &str = "12";

pub fn get_swift_target_info() -> SwiftTarget {
let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let mut arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
if arch == "aarch64" {
arch = "arm64".into();
}
let target = format!("{}-apple-macosx{}", arch, MACOS_TARGET_VERSION);

let swift_target_info_str = Command::new("swift")
Expand Down

0 comments on commit 5b2f18e

Please sign in to comment.