DependenciesScanner: include compiled module candidates for textual module interface in JSON output

Instead of replacing an interface file with its up-to-date compile module,
the dep-scanner should report potentially up-to-date module candidates either adjacent to
the interface file or in the prebuilt module cache. swift-driver should later pass down
these candidates to -compile-module-from-interface invocation and the front-end job
will check if one of the candidates is ready to use. The front-end job then either emits a forwarding
module to an up-to-date candidate or a binary module.
This commit is contained in:
Xi Ge
2020-07-17 10:15:04 -07:00
parent 61e77bd701
commit b93ff79cb0
8 changed files with 78 additions and 49 deletions

View File

@@ -237,8 +237,9 @@ public:
bool SerializeDependencyHashes, bool TrackSystemDependencies,
ModuleInterfaceLoaderOptions Opts);
std::string getUpToDateCompiledModuleForInterface(StringRef moduleName,
StringRef interfacePath) override;
std::vector<std::string>
getCompiledModuleCandidatesForInterface(StringRef moduleName,
StringRef interfacePath) override;
};
struct InterfaceSubContextDelegateImpl: InterfaceSubContextDelegate {