|
| 1 | +When running the extractor against a different version of the swift compiler, we provide it the |
| 2 | +original standard library via `-resource-dir`, and we do want that to be lazily compiled out of the |
| 3 | +`.swiftinterface` files. The code removed here explicitly disables that behavior. |
| 4 | + |
| 5 | +diff --git a/lib/Frontend/ModuleInterfaceLoader.cpp b/lib/Frontend/ModuleInterfaceLoader.cpp |
| 6 | +index 2a490a680d8..8d8f48aeed0 100644 |
| 7 | +--- a/lib/Frontend/ModuleInterfaceLoader.cpp |
| 8 | ++++ b/lib/Frontend/ModuleInterfaceLoader.cpp |
| 9 | +@@ -726,21 +726,6 @@ class ModuleInterfaceLoaderImpl { |
| 10 | + << "; deferring to serialized module loader\n"); |
| 11 | + UsableModulePath = adjacentMod; |
| 12 | + return std::make_error_code(std::errc::not_supported); |
| 13 | +- } else if (isInResourceDir(adjacentMod) && |
| 14 | +- loadMode == ModuleLoadingMode::PreferSerialized) { |
| 15 | +- // Special-case here: If we're loading a .swiftmodule from the resource |
| 16 | +- // dir adjacent to the compiler, defer to the serialized loader instead |
| 17 | +- // of falling back. This is mainly to support development of Swift, |
| 18 | +- // where one might change the module format version but forget to |
| 19 | +- // recompile the standard library. If that happens, don't fall back |
| 20 | +- // and silently recompile the standard library -- instead, error like |
| 21 | +- // we used to. |
| 22 | +- LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module in the " |
| 23 | +- "resource-dir at " |
| 24 | +- << adjacentMod |
| 25 | +- << "; deferring to serialized module loader " |
| 26 | +- "to diagnose\n"); |
| 27 | +- return std::make_error_code(std::errc::not_supported); |
| 28 | + } else { |
| 29 | + LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module at " |
| 30 | + << adjacentMod << "\n"); |
0 commit comments