mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Driver/Frontend] Add target variant SDK version for Catalyst.
This commit is contained in:
@@ -606,6 +606,18 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the target variant SDK version.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_target_variant_sdk_version)) {
|
||||
auto vers = version::Version::parseVersionString(
|
||||
A->getValue(), SourceLoc(), &Diags);
|
||||
if (vers.hasValue()) {
|
||||
Opts.VariantSDKVersion = *vers;
|
||||
} else {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
A->getAsString(Args), A->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
return HadError || UnsupportedOS || UnsupportedArch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user