Open
Description
Hi all, invoking cargo build
from Xcode on Big Sur currently fails when a crate needs to link against a system library from a build script, unless SDKROOT
has been explicitly set to the path of the macOS SDK. Test project here.
When invoking cargo build
from an Xcode build script, SDKROOT
is set for the platform that's being built. #64254 made it so that SDKROOT
gets un-set if the target platform doesn't match the host platform. This seems reasonable to me, but then I don't understand why there's now a difference in behaviour between Xcode and non-Xcode builds.
I logged a similiar issue for cargo-lipo
, which has a different workaround of instead setting LIBRARY_PATH
.