Add deployment-target --print flag for Apple targets
This commit is contained in:
parent
74c4821045
commit
a427d418fd
11 changed files with 73 additions and 14 deletions
|
@ -745,6 +745,22 @@ fn print_crate_info(
|
|||
}
|
||||
}
|
||||
}
|
||||
DeploymentTarget => {
|
||||
use rustc_target::spec::current_apple_deployment_target;
|
||||
|
||||
if sess.target.is_like_osx {
|
||||
safe_println!(
|
||||
"deployment_target={}",
|
||||
current_apple_deployment_target(&sess.target)
|
||||
.expect("unknown Apple target OS")
|
||||
)
|
||||
} else {
|
||||
early_error(
|
||||
ErrorOutputType::default(),
|
||||
"only Apple targets currently support deployment version info",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Compilation::Stop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue