[Caching] Allow prefix mapping for generated bridging header

To allow prefix mapping of the bridging header to achieve cache hit when
source files are located in different location, the generated chained
bridging header should not include absolute paths of the headers. Fix
the problem by concat the chained bridging header together.

Fixes: https://github.com/swiftlang/swift/issues/84088
This commit is contained in:
Steven Wu
2025-09-10 16:33:56 -07:00
parent 963aad3556
commit b7329f4ea7
16 changed files with 241 additions and 82 deletions

View File

@@ -577,9 +577,9 @@ bool extractCompilerFlagsFromInterface(
llvm::VersionTuple extractUserModuleVersionFromInterface(StringRef moduleInterfacePath);
/// Extract embedded bridging header from binary module.
std::string
std::unique_ptr<llvm::MemoryBuffer>
extractEmbeddedBridgingHeaderContent(std::unique_ptr<llvm::MemoryBuffer> file,
ASTContext &Context);
StringRef headerPath, ASTContext &Context);
} // end namespace swift
#endif