Merge pull request #72668 from artemcm/DepScanBinaryModuleHeaderDepModuleDeps

[Explicit Module Builds] Only specify '-fmodule-map-file' for bridging header Clang module dependencies
This commit is contained in:
Artem Chikin
2024-03-29 09:02:10 -07:00
committed by GitHub
10 changed files with 85 additions and 10 deletions

View File

@@ -1847,8 +1847,8 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
}
// Pass down -explicit-swift-module-map-file
StringRef explicitSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMap;
genericSubInvocation.getSearchPathOptions().ExplicitSwiftModuleMap =
StringRef explicitSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMapPath;
genericSubInvocation.getSearchPathOptions().ExplicitSwiftModuleMapPath =
explicitSwiftModuleMap.str();
// Pass down VFSOverlay flags (do not need to inherit the options because
@@ -2198,6 +2198,7 @@ struct ExplicitSwiftModuleLoader::Implementation {
for (auto &entry : ExplicitClangModuleMap) {
const auto &moduleMapPath = entry.getValue().moduleMapPath;
if (!moduleMapPath.empty() &&
entry.getValue().isBridgingHeaderDependency &&
moduleMapsSeen.find(moduleMapPath) == moduleMapsSeen.end()) {
moduleMapsSeen.insert(moduleMapPath);
extraClangArgs.push_back(