1
Fork 0

Print env var in --print=deployment-target

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 environment variable.
This commit is contained in:
Mads Marquart 2024-11-14 17:43:52 +01:00
parent a47555110c
commit 431c500c60
6 changed files with 29 additions and 18 deletions

View file

@ -97,7 +97,7 @@ fn minimum_deployment_target(target: &Target) -> OSVersion {
}
/// Name of the environment variable used to fetch the deployment target on the given OS.
fn deployment_target_env_var(os: &str) -> &'static str {
pub fn deployment_target_env_var(os: &str) -> &'static str {
match os {
"macos" => "MACOSX_DEPLOYMENT_TARGET",
"ios" => "IPHONEOS_DEPLOYMENT_TARGET",