Frontend: Inherit compiler debugging options during module interface actions.

When building a module interface for the -typecheck-module-from-interface or
-compile-module-from-interface actions, inherit and honor compiler debugging
options and emit debugging output at the end of the interface build.
This commit is contained in:
Allan Shortlidge
2025-08-12 09:36:37 -07:00
parent 901e8becb2
commit 5d3d93478a
9 changed files with 99 additions and 49 deletions

View File

@@ -203,6 +203,7 @@ std::error_code ExplicitModuleInterfaceBuilder::buildSwiftModuleFromInterface(
ArrayRef<std::string> CompiledCandidates,
StringRef CompilerVersion) {
auto Invocation = Instance.getInvocation();
// Try building forwarding module first. If succeed, return.
if (Instance.getASTContext()
.getModuleInterfaceChecker()
@@ -254,6 +255,9 @@ std::error_code ExplicitModuleInterfaceBuilder::buildSwiftModuleFromInterface(
builtByCompiler);
}
}
// If requested, dump debugging output before exiting.
Instance.emitEndOfPipelineDebuggingOutput();
};
Instance.performSema();