Skip to content

Commit 7c3de38

Browse files
committed
Use SDKROOT when set.
1 parent fba7fed commit 7c3de38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,11 @@ impl Build {
21282128
};
21292129

21302130
self.print(&format!("Detecting iOS SDK path for {}", sdk));
2131-
let sdk_path = self.apple_sdk_root(sdk)?;
2131+
let sdk_path = if let Some(sdkroot) = env::var_os("SDKROOT") {
2132+
sdkroot
2133+
} else {
2134+
self.apple_sdk_root(sdk)?
2135+
};
21322136
cmd.args.push("-isysroot".into());
21332137
cmd.args.push(sdk_path);
21342138
cmd.args.push("-fembed-bitcode".into());

0 commit comments

Comments
 (0)