Skip to content

Commit a4a0e06

Browse files
committed
fix lazy swiftinterface compilation for -resource-dir
1 parent 99fafb0 commit a4a0e06

File tree

3 files changed

+26
-171
lines changed

3 files changed

+26
-171
lines changed

actions/build/action.yml

Lines changed: 0 additions & 121 deletions
This file was deleted.

actions/release/action.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/lib/Frontend/ModuleInterfaceLoader.cpp b/lib/Frontend/ModuleInterfaceLoader.cpp
2+
index 2a490a680d8..8d8f48aeed0 100644
3+
--- a/lib/Frontend/ModuleInterfaceLoader.cpp
4+
+++ b/lib/Frontend/ModuleInterfaceLoader.cpp
5+
@@ -726,21 +726,6 @@ class ModuleInterfaceLoaderImpl {
6+
<< "; deferring to serialized module loader\n");
7+
UsableModulePath = adjacentMod;
8+
return std::make_error_code(std::errc::not_supported);
9+
- } else if (isInResourceDir(adjacentMod) &&
10+
- loadMode == ModuleLoadingMode::PreferSerialized) {
11+
- // Special-case here: If we're loading a .swiftmodule from the resource
12+
- // dir adjacent to the compiler, defer to the serialized loader instead
13+
- // of falling back. This is mainly to support development of Swift,
14+
- // where one might change the module format version but forget to
15+
- // recompile the standard library. If that happens, don't fall back
16+
- // and silently recompile the standard library -- instead, error like
17+
- // we used to.
18+
- LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module in the "
19+
- "resource-dir at "
20+
- << adjacentMod
21+
- << "; deferring to serialized module loader "
22+
- "to diagnose\n");
23+
- return std::make_error_code(std::errc::not_supported);
24+
} else {
25+
LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module at "
26+
<< adjacentMod << "\n");

0 commit comments

Comments
 (0)