mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #21110 from aciidb0mb3r/swiftpm-manifest-version
Extend @available to support PackageDescription
This commit is contained in:
@@ -191,6 +191,16 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
diagnoseSwiftVersion(vers, A, Args, Diags);
|
||||
}
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_package_description_version)) {
|
||||
auto vers = version::Version::parseVersionString(
|
||||
A->getValue(), SourceLoc(), &Diags);
|
||||
if (vers.hasValue()) {
|
||||
Opts.PackageDescriptionVersion = vers.getValue();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Opts.AttachCommentsToDecls |= Args.hasArg(OPT_dump_api_path);
|
||||
|
||||
Opts.UseMalloc |= Args.hasArg(OPT_use_malloc);
|
||||
|
||||
Reference in New Issue
Block a user