mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: Really allow any experimental feature when compiling a module interface.
The fix for https://github.com/apple/swift/pull/72632 was not sufficient because when modules are built from textual interface that happens in a sub-invocation which does not have typecheck-from-interface or compile-from-interface requested action. Instead of checking a requested action, set a language option to control whether non-production experimental features are allowed. Resolves rdar://125561443
This commit is contained in:
@@ -2066,6 +2066,12 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
|
||||
bool StrictImplicitModuleContext =
|
||||
subInvocation.getFrontendOptions().StrictImplicitModuleContext;
|
||||
|
||||
// It isn't appropriate to restrict use of experimental features in another
|
||||
// module since it may have been built with a different compiler that allowed
|
||||
// the use of the feature.
|
||||
subInvocation.getLangOptions().RestrictNonProductionExperimentalFeatures =
|
||||
false;
|
||||
|
||||
// Save the target triple from the original context.
|
||||
llvm::Triple originalTargetTriple(subInvocation.getLangOptions().Target);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user