Fixes https://github.com/dotnet/runtime/issues/47581.
{
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)
{