Print name of env var in --print=deployment-target
#133041
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The deployment target environment variable is OS-specific, and if you're in a place where you're asking
rustc
for the deployment target, you're likely to also wanna know the name of the environment variable. I myself wanted this for some code I'm working on in bootstrap, for example.Behaviour before this PR:
Behaviour after this PR:
My belief is that this option is extremely rarely used in general, and a GitHub search for "rustc print deployment-target" seems to confirm this, it revealed only the following actual pieces of code using this:
maturin
does.split('=').last()
, so it will continue to work after this change, butcc v1.0.84
did.strip_prefix("deployment_target=")
since this PR, so it would break. That's probably fine though, it was broken in a lot of scenarios anyway, and got reverted inv1.0.85
.So while this is technically a breaking change, I really doubt that anyone is going to observe it, so it's probably fine.
@BlackHoleFox wdyt?
@rustbot label O-apple
r? compiler