From 38dfb78c0c6b69a7a8008b92d39bd1e277ea2f9c Mon Sep 17 00:00:00 2001 From: Ronny Chan Date: Mon, 26 May 2025 22:51:34 -0400 Subject: [PATCH] Also set `SDKROOT` when building apple platforms --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 05fec229..6358cfb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2742,6 +2742,8 @@ impl Build { cmd.args.push("-isysroot".into()); cmd.args.push(OsStr::new(&sdk_path).to_owned()); + cmd.env + .push(("SDKROOT".into(), OsStr::new(&sdk_path).to_owned())); if target.abi == "macabi" { // Mac Catalyst uses the macOS SDK, but to compile against and