Apple: Refactor deployment target version parsing
- Merge minimum OS version list into one function (makes it easier to see the logic in it). - Parse patch deployment target versions. - Consistently specify deployment target in LLVM target (previously omitted on `aarch64-apple-watchos`).
This commit is contained in:
parent
23cdb50e4f
commit
5b51331abe
28 changed files with 323 additions and 364 deletions
|
@ -871,9 +871,9 @@ fn print_crate_info(
|
|||
use rustc_target::spec::current_apple_deployment_target;
|
||||
|
||||
if sess.target.is_like_osx {
|
||||
let (major, minor) = current_apple_deployment_target(&sess.target)
|
||||
.expect("unknown Apple target OS");
|
||||
println_info!("deployment_target={}", format!("{major}.{minor}"))
|
||||
let (major, minor, patch) = current_apple_deployment_target(&sess.target);
|
||||
let patch = if patch != 0 { format!(".{patch}") } else { String::new() };
|
||||
println_info!("deployment_target={major}.{minor}{patch}")
|
||||
} else {
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
sess.dcx().fatal("only Apple targets currently support deployment version info")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue