mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Interpreter] Fall back to loading Swift dylibs from /usr/lib/swift on Apple platforms.
Continue to load the dylibs next to the compiler if they exist. If they don't, then use the OS's dylibs. rdar://problem/47528005
This commit is contained in:
@@ -1066,9 +1066,12 @@ class ParseableInterfaceModuleLoaderImpl {
|
||||
}
|
||||
|
||||
bool isInResourceDir(StringRef path) {
|
||||
StringRef resourceDir = ctx.SearchPathOpts.RuntimeLibraryPath;
|
||||
if (resourceDir.empty()) return false;
|
||||
return path.startswith(resourceDir);
|
||||
for (auto &RuntimeLibraryPath : ctx.SearchPathOpts.RuntimeLibraryPaths) {
|
||||
if (path.startswith(RuntimeLibraryPath)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Finds the most appropriate .swiftmodule, whose dependencies are up to
|
||||
|
||||
Reference in New Issue
Block a user