mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: teach the compiler to use a backup directory to find .swiftinterface files to compile
This mechanism allows the compiler to use a backup interface file to build into a binary module when a corresponding interface file from the SDK is failing for whatever reasons. This mechansim should be entirely opaque to end users except several diagnostic messages communicating backup interfaces are used. Part of rdar://77676064
This commit is contained in:
@@ -103,7 +103,11 @@ bool ModuleInterfaceBuilder::collectDepsForSerialization(
|
||||
// dependency list -- don't serialize that.
|
||||
if (!prebuiltCachePath.empty() && DepName.startswith(prebuiltCachePath))
|
||||
continue;
|
||||
|
||||
// Don't serialize interface path if it's from the preferred interface dir.
|
||||
// This ensures the prebuilt module caches generated from these interfaces are
|
||||
// relocatable.
|
||||
if (!backupInterfaceDir.empty() && DepName.startswith(backupInterfaceDir))
|
||||
continue;
|
||||
if (dependencyTracker) {
|
||||
dependencyTracker->addDependency(DepName, /*isSystem*/IsSDKRelative);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user