Statically link System.Native into the final exe on ios, since the pinvoke mapping...
authorZoltan Varga <vargaz@gmail.com>
Thu, 11 Feb 2021 02:03:26 +0000 (21:03 -0500)
committerGitHub <noreply@github.com>
Thu, 11 Feb 2021 02:03:26 +0000 (21:03 -0500)
Fixes https://github.com/dotnet/runtime/issues/47581.

src/tasks/AppleAppBuilder/Xcode.cs

index 3f29fcf..80d2c10 100644 (file)
@@ -84,7 +84,7 @@ internal class Xcode
         {
             string libName = Path.GetFileNameWithoutExtension(lib);
             // libmono must always be statically linked, for other librarires we can use dylibs
-            bool dylibExists = libName != "libmonosgen-2.0" && dylibs.Any(dylib => Path.GetFileName(dylib) == libName + ".dylib");
+            bool dylibExists = libName != "libmonosgen-2.0" && libName != "libSystem.Native" && dylibs.Any(dylib => Path.GetFileName(dylib) == libName + ".dylib");
 
             if (!preferDylibs || !dylibExists)
             {