-
-
Notifications
You must be signed in to change notification settings - Fork 339
Description
Running maturin develop
will set the MACOSX_DEPLOYMENT_TARGET
environment variable. The objc-sys
crate has a build.rs
file that rebuilds if MACOSX_DEPLOYMENT_TARGET
changes.
The problem comes from me then running a normal cargo build
, which doesn't set MACOSX_DEPLOYMENT_TARGET
. Now objc-sys
and all its dependencies (a lot of them, including winit
) will rebuild. When I type maturing develop
again, everything rebuilds yet again.
One solution is to set MACOSX_DEPLOYMENT_TARGET=11.0
globally in my ~/.zshrc
, but I'd like for a more solid solution that works for any contributor to my repository.
I initially though that adding MACOSX_DEPLOYMENT_TARGET="11.0"
under [env]
in .cargo/config.toml
would solve it, but those env-vars seems to only be visible to build.rs
files inside my repository, and hence not by objc-sys/build.rs
.
So now I'm wondering - can we have an option so that Maturin does NOT set MACOSX_DEPLOYMENT_TARGET
, at least not when running maturin develop
? What would be the effect of not setting it?