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:
Xi Ge
2021-05-10 16:31:58 -07:00
parent 7487c12d05
commit b6cd513534
20 changed files with 303 additions and 74 deletions

View File

@@ -0,0 +1,6 @@
// REQUIRES: VENDOR=apple
// RUN: %empty-directory(%t/module-cache)
// RUN: not %target-swift-frontend-typecheck -disable-implicit-concurrency-module-import -target arm64-apple-macosx13.0 -F %S/Inputs %s -module-cache-path %t/module-cache
// RUN: %target-swift-frontend-typecheck -disable-implicit-concurrency-module-import -target arm64-apple-macosx13.0 -F %S/Inputs %s -module-cache-path %t/module-cache -backup-module-interface-path %S/Inputs/alternative-interfaces
import DummyFramework