Skip to content

Commit

Permalink
Use SDKROOT when set.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch authored and thomcc committed Oct 25, 2022
1 parent 53fb72c commit 11f5390
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,12 @@ impl Build {
};

self.print(&format!("Detecting {} SDK path for {}", os, sdk));
let sdk_path = self.apple_sdk_root(sdk.as_str())?;
let sdk_path = if let Some(sdkroot) = env::var_os("SDKROOT") {
sdkroot
} else {
self.apple_sdk_root(sdk.as_str())?
};

cmd.args.push("-isysroot".into());
cmd.args.push(sdk_path);
cmd.args.push("-fembed-bitcode".into());
Expand Down

0 comments on commit 11f5390

Please sign in to comment.