mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: add a flag to downgrade all module interface verification errors to warnings
Ideally, module interface verification should fail the build when fatal error occurs when type checking emitted module interfaces. However, we found it's hard to stage this phase in because the ideal case requires all Swift adopters to have valid interfaces. This new front-end flag allows driver to downgrade all interface verification errors to warnings as an intermediate step.
This commit is contained in:
@@ -1497,7 +1497,9 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
||||
if (LoaderOpts.remarkOnRebuildFromInterface) {
|
||||
GenericArgs.push_back("-Rmodule-interface-rebuild");
|
||||
}
|
||||
|
||||
// This flag only matters when we are verifying an textual interface.
|
||||
frontendOpts.DowngradeInterfaceVerificationError =
|
||||
LoaderOpts.downgradeInterfaceVerificationError;
|
||||
// Note that we don't assume cachePath is the same as the Clang
|
||||
// module cache path at this point.
|
||||
if (buildModuleCacheDirIfAbsent && !moduleCachePath.empty())
|
||||
|
||||
Reference in New Issue
Block a user