[CrossImport][PrefixMap] Make sure overlay file is remapped if used

When dependency scanner construct the overlay file path for the
swift-frontend invocation, make sure the path is remapped if prefix map
is used.

rdar://131940130
This commit is contained in:
Steven Wu
2024-07-17 12:08:59 -07:00
parent 24a46c422b
commit b51436ed6c
2 changed files with 27 additions and 5 deletions

View File

@@ -963,7 +963,8 @@ void ModuleDependencyScanner::discoverCrossImportOverlayDependencies(
mainDep.addAuxiliaryFile(entry.second);
cmdCopy.push_back("-swift-module-cross-import");
cmdCopy.push_back(entry.first);
cmdCopy.push_back(entry.second);
auto overlayPath = cache.getScanService().remapPath(entry.second);
cmdCopy.push_back(overlayPath);
}
mainDep.updateCommandLine(cmdCopy);