[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

@@ -675,9 +675,9 @@ public:
}
/// Get embedded bridging header.
std::string getEmbeddedHeader() const {
StringRef getEmbeddedHeader() const {
// Don't include the '\0' in the end.
return importedHeaderInfo.contents.drop_back().str();
return importedHeaderInfo.contents.drop_back();
}
/// If the module-defining `.swiftinterface` file is an SDK-relative path,