Skip to content

Commit 0d15c84

Browse files
committed
remove un-necessary loadLibrary with dylib
1 parent 6ca633c commit 0d15c84

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

SwiftKit/src/main/java/org/swift/swiftkit/SwiftKit.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class SwiftKit {
3434
static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
3535

3636
static {
37-
System.load(STDLIB_MACOS_DYLIB_PATH);
3837
System.loadLibrary(STDLIB_DYLIB_NAME);
3938
System.loadLibrary("SwiftKitSwift");
4039
}
@@ -43,8 +42,7 @@ public class SwiftKit {
4342

4443
private static SymbolLookup getSymbolLookup() {
4544
if (PlatformUtils.isMacOS()) {
46-
// FIXME: why does this not find just by name on macOS?
47-
// SymbolLookup.libraryLookup(System.mapLibraryName(STDLIB_DYLIB_NAME), LIBRARY_ARENA)
45+
// On Apple platforms we need to lookup using the complete path
4846
return SymbolLookup.libraryLookup(STDLIB_MACOS_DYLIB_PATH, LIBRARY_ARENA)
4947
.or(SymbolLookup.loaderLookup())
5048
.or(Linker.nativeLinker().defaultLookup());

0 commit comments

Comments
 (0)