Frontend: Introduce an alias for the NoncopyableGenerics experimental feature.

The `.swiftinterface` of the standard library must remain compatible with some
older compilers. Unfortunately, some of those older compilers do not allow the
experimental feature `NoncopyableGenerics` to be enabled in production. To
allow the stdlib to build with non-copyable generics enabled and still have the
older compilers consume its interface, we have to use a new experimental
feature identifier that they do not know about.

Partially resolves rdar://125138945
This commit is contained in:
Allan Shortlidge
2024-03-26 18:31:03 -07:00
parent 418dd95d8e
commit 2813fbe309
4 changed files with 9 additions and 1 deletions

View File

@@ -883,6 +883,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
#else
Opts.enableFeature(*feature);
#endif
if (*feature == Feature::NoncopyableGenerics2)
Opts.enableFeature(Feature::NoncopyableGenerics);
}
// Hack: In order to support using availability macros in SPM packages, we