1
Fork 0

Emit diagnostics for incorrect deployment targets

This commit is contained in:
Mads Marquart 2024-09-29 22:14:55 +02:00
parent e75a7ddad3
commit 1ef1af1c60
5 changed files with 57 additions and 12 deletions

View file

@ -2,6 +2,7 @@
use std::borrow::Cow;
use std::io::Error;
use std::num::ParseIntError;
use std::path::{Path, PathBuf};
use std::process::ExitStatus;
@ -539,6 +540,14 @@ pub(crate) struct UnsupportedArch<'a> {
pub os: &'a str,
}
#[derive(Diagnostic)]
pub(crate) enum AppleDeploymentTarget {
#[diag(codegen_ssa_apple_deployment_target_invalid)]
Invalid { env_var: &'static str, error: ParseIntError },
#[diag(codegen_ssa_apple_deployment_target_too_low)]
TooLow { env_var: &'static str, version: String, os_min: String },
}
#[derive(Diagnostic)]
pub(crate) enum AppleSdkRootError<'a> {
#[diag(codegen_ssa_apple_sdk_error_sdk_path)]