ModuleInterface: remark potential version differences between SDK and prebuilt modules

Prebuilt-module directory now contains a SystemVersion.plist file copied from the SDK
it's built from. This patch teaches the compiler to remark this version and the SDK version
when -Rmodule-interface-rebuild is specified. The difference between these versions could
help us debug unusable prebuilt modules.
This commit is contained in:
Xi Ge
2020-09-04 11:12:12 -07:00
parent 9d908ec4dc
commit 028a75572c
10 changed files with 85 additions and 48 deletions

View File

@@ -26,6 +26,7 @@
// can be reflected as source-breaking changes for API users. If they are,
// the output of api-digester will include such changes.
#include "swift/Basic/Platform.h"
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
#include "swift/Frontend/SerializedDiagnosticConsumer.h"
#include "swift/AST/DiagnosticsModuleDiffer.h"
@@ -2704,7 +2705,7 @@ static CheckerOptions getCheckOpts(int argc, char *argv[]) {
Opts.ToolArgs.push_back(argv[i]);
if (!options::SDK.empty()) {
auto Ver = getSDKVersion(options::SDK);
auto Ver = getSDKBuildVersion(options::SDK);
if (!Ver.empty()) {
Opts.ToolArgs.push_back("-sdk-version");
Opts.ToolArgs.push_back(Ver);