Skip to content

Commit 73f684f

Browse files
authored
Rollup merge of #130334 - madsmtm:macos-sdkroot-ignore, r=jieyouxu
Fix `SDKROOT` ignore on macOS `rustc` has code to detect when `SDKROOT` is obviously set for the wrong platform, so that it can choose to ignore it. This is a pretty important feature for Cargo build scripts and proc macros, since you will often have `SDKROOT` set to an iOS platform there. However, the code was checking for an old SDK version name `"macosx10.15"` that was previously configured by `add_apple_sdk`, but nowadays configured to the correct `"macosx"`. I think this error was introduced in part #77202 and in #100286. Fixes part of #80817 (linking with `-Clinker=ld` now works), though more work is still needed in this area, see also #129432. ``@rustbot`` label O-macos A-cross
2 parents 517e7ce + 56844c7 commit 73f684f

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3044,7 +3044,7 @@ fn get_apple_sdk_root(sdk_name: &str) -> Result<String, errors::AppleSdkRootErro
30443044
"iphonesimulator"
30453045
if sdkroot.contains("iPhoneOS.platform") || sdkroot.contains("MacOSX.platform") => {
30463046
}
3047-
"macosx10.15"
3047+
"macosx"
30483048
if sdkroot.contains("iPhoneOS.platform")
30493049
|| sdkroot.contains("iPhoneSimulator.platform") => {}
30503050
"watchos"

0 commit comments

Comments
 (0)