Skip to content

Commit ca1ccd9

Browse files
committed
-isysroot priors to $SDKROOT
1 parent 6d9a9ed commit ca1ccd9

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/lib.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3356,19 +3356,6 @@ impl Build {
33563356
let target = self.get_target()?;
33573357
let host = self.get_host()?;
33583358
if host.contains("apple-darwin") && target.contains("apple-darwin") {
3359-
// If, for example, `cargo` runs during the build of an XCode project, then `SDKROOT` environment variable
3360-
// would represent the current target, and this is the problem for us, if we want to compile something
3361-
// for the host, when host != target.
3362-
// We can not just remove `SDKROOT`, because, again, for example, XCode add to PATH
3363-
// /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
3364-
// and `cc` from this path can not find system include files, like `pthread.h`, if `SDKROOT`
3365-
// is not set
3366-
if let Ok(sdkroot) = env::var("SDKROOT") {
3367-
if !sdkroot.contains("MacOSX") {
3368-
let macos_sdk = self.apple_sdk_root("macosx")?;
3369-
cmd.env("SDKROOT", macos_sdk);
3370-
}
3371-
}
33723359
// Additionally, `IPHONEOS_DEPLOYMENT_TARGET` must not be set when using the Xcode linker at
33733360
// "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld",
33743361
// although this is apparently ignored when using the linker at "/usr/bin/ld".

0 commit comments

Comments
 (0)