mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: avoid remarking missing prebuilt module for stdlib by default
Prebuilt modules are only available for certain toolchain and SDK combinations. Therefore, building modules from interface, even for the stdlib, is expected to happen. related: rdar://96701615
This commit is contained in:
@@ -981,21 +981,9 @@ class ModuleInterfaceLoaderImpl {
|
||||
diag::rebuilding_module_from_interface, moduleName,
|
||||
interfacePath);
|
||||
};
|
||||
// Diagnose only for the standard library; it should be prebuilt in typical
|
||||
// workflows, but if it isn't, building it may take several minutes and a
|
||||
// lot of memory, so users may think the compiler is busy-hung.
|
||||
auto remarkRebuildStdlib = [&]() {
|
||||
if (moduleName != "Swift")
|
||||
return;
|
||||
|
||||
auto moduleTriple = getTargetSpecificModuleTriple(ctx.LangOpts.Target);
|
||||
rebuildInfo.diagnose(ctx, diags, prebuiltCacheDir, SourceLoc(),
|
||||
diag::rebuilding_stdlib_from_interface,
|
||||
moduleTriple.str());
|
||||
};
|
||||
auto remarkRebuild = Opts.remarkOnRebuildFromInterface
|
||||
? llvm::function_ref<void()>(remarkRebuildAll)
|
||||
: remarkRebuildStdlib;
|
||||
: nullptr;
|
||||
|
||||
bool failed = false;
|
||||
std::string backupPath = getBackupPublicModuleInterfacePath();
|
||||
|
||||
Reference in New Issue
Block a user