Skip to content

Commit ce58a7c

Browse files
committed
-isysroot priors to $SDKROOT
1 parent 25d8fb1 commit ce58a7c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/lib.rs

-13
Original file line numberDiff line numberDiff line change
@@ -2853,19 +2853,6 @@ impl Build {
28532853
let target = self.get_target()?;
28542854
let host = self.get_host()?;
28552855
if host.contains("apple-darwin") && target.contains("apple-darwin") {
2856-
// If, for example, `cargo` runs during the build of an XCode project, then `SDKROOT` environment variable
2857-
// would represent the current target, and this is the problem for us, if we want to compile something
2858-
// for the host, when host != target.
2859-
// We can not just remove `SDKROOT`, because, again, for example, XCode add to PATH
2860-
// /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
2861-
// and `cc` from this path can not find system include files, like `pthread.h`, if `SDKROOT`
2862-
// is not set
2863-
if let Ok(sdkroot) = env::var("SDKROOT") {
2864-
if !sdkroot.contains("MacOSX") {
2865-
let macos_sdk = self.apple_sdk_root("macosx")?;
2866-
cmd.env("SDKROOT", macos_sdk);
2867-
}
2868-
}
28692856
// Additionally, `IPHONEOS_DEPLOYMENT_TARGET` must not be set when using the Xcode linker at
28702857
// "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld",
28712858
// although this is apparently ignored when using the linker at "/usr/bin/ld".

0 commit comments

Comments
 (0)