[Dependency Scanning] Disable validation of Swift dependency modules' existing pre-built candidate binary module files in the scanner, on a non-caching build.

As-is, this default interferes with the incremental build machinery which conservatively assumes that binary module dependencies must cause dependents to be re-built.
This commit is contained in:
Artem Chikin
2024-07-29 17:16:54 -07:00
parent 741cd47657
commit a2dc674723
9 changed files with 28 additions and 23 deletions

View File

@@ -1403,7 +1403,7 @@ ModuleInterfaceCheckerImpl::getCompiledModuleCandidatesForInterface(
auto validateModule = [&](StringRef modulePath) {
// Legacy behavior do not validate module.
if (Ctx.SearchPathOpts.NoScannerModuleValidation)
if (!Ctx.SearchPathOpts.ScannerModuleValidation)
return true;
// If we picked the other module already, no need to validate this one since
@@ -1922,8 +1922,7 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
searchPathOpts.PluginSearchOpts;
// Get module loading behavior options.
genericSubInvocation.getSearchPathOptions().NoScannerModuleValidation =
searchPathOpts.NoScannerModuleValidation;
genericSubInvocation.getSearchPathOptions().ScannerModuleValidation = searchPathOpts.ScannerModuleValidation;
genericSubInvocation.getSearchPathOptions().ModuleLoadMode =
searchPathOpts.ModuleLoadMode;