From 82fbb1e0b745021216036b073ad0c3f54d32ec01 Mon Sep 17 00:00:00 2001 From: WildCat Date: Sun, 1 May 2022 10:20:12 +0800 Subject: [PATCH 1/2] Mac Catalyst: Read IPHONEOS_DEPLOYMENT_TARGET from envrionment variable --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e3a2b98b0..830f15ee0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1573,8 +1573,10 @@ impl Build { if let Some(arch) = map_darwin_target_from_rust_to_compiler_architecture(target) { + let deployment_target = env::var("IPHONEOS_DEPLOYMENT_TARGET") + .unwrap_or_else(|_| "13.0".into()); cmd.args - .push(format!("--target={}-apple-ios13.0-macabi", arch).into()); + .push(format!("--target={}-apple-ios{}-macabi", arch, deployment_target).into()); } } else if target.contains("ios-sim") { if let Some(arch) = From 310a43a5c2e8faeff72fc12cda18c20b043fc2ca Mon Sep 17 00:00:00 2001 From: WildCat Date: Sun, 1 May 2022 10:28:17 +0800 Subject: [PATCH 2/2] fmt --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 830f15ee0..dc9025dde 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1575,8 +1575,10 @@ impl Build { { let deployment_target = env::var("IPHONEOS_DEPLOYMENT_TARGET") .unwrap_or_else(|_| "13.0".into()); - cmd.args - .push(format!("--target={}-apple-ios{}-macabi", arch, deployment_target).into()); + cmd.args.push( + format!("--target={}-apple-ios{}-macabi", arch, deployment_target) + .into(), + ); } } else if target.contains("ios-sim") { if let Some(arch) =