Skip to content

Commit bb37a36

Browse files
authored
Statically link System.Native into the final exe on ios, since the pinvoke mapping maps calls to it to __Internal. (#48135)
Fixes #47581.
1 parent c9a1355 commit bb37a36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tasks/AppleAppBuilder/Xcode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public string GenerateXCode(
8484
{
8585
string libName = Path.GetFileNameWithoutExtension(lib);
8686
// libmono must always be statically linked, for other librarires we can use dylibs
87-
bool dylibExists = libName != "libmonosgen-2.0" && dylibs.Any(dylib => Path.GetFileName(dylib) == libName + ".dylib");
87+
bool dylibExists = libName != "libmonosgen-2.0" && libName != "libSystem.Native" && dylibs.Any(dylib => Path.GetFileName(dylib) == libName + ".dylib");
8888

8989
if (!preferDylibs || !dylibExists)
9090
{

0 commit comments

Comments
 (0)