MACOSX_DEPLOYMENT_TARGET
causing spurious rebuilds due to objc-sys
#1804
Labels
enhancement
New feature or request
Running
maturin develop
will set theMACOSX_DEPLOYMENT_TARGET
environment variable. Theobjc-sys
crate has abuild.rs
file that rebuilds ifMACOSX_DEPLOYMENT_TARGET
changes.The problem comes from me then running a normal
cargo build
, which doesn't setMACOSX_DEPLOYMENT_TARGET
. Nowobjc-sys
and all its dependencies (a lot of them, includingwinit
) will rebuild. When I typematuring 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 tobuild.rs
files inside my repository, and hence not byobjc-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 runningmaturin develop
? What would be the effect of not setting it?The text was updated successfully, but these errors were encountered: