mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST][IRGen] Add -min-runtime-version option and IRGen support code.
Add a `-min-runtime-version` option that can be used to avoid problems when building on Linux and Windows where because the runtime isn't part of the OS, availability doesn't solve the problem of trying to build the compiler against an older runtime. Also add functions to IRGen to make it easy to test feature availability using both the runtime version and the existing Darwin availability support. rdar://121522431
This commit is contained in:
@@ -1213,6 +1213,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
// FIXME: Should we diagnose if it's below the default?
|
||||
Opts.MinimumInliningTargetVersion = *vers;
|
||||
|
||||
if (auto vers = parseVersionArg(OPT_min_runtime_version))
|
||||
Opts.RuntimeVersion = version::Version(*vers);
|
||||
|
||||
if (auto vers = parseVersionArg(OPT_target_sdk_version))
|
||||
Opts.SDKVersion = *vers;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user