diff --git a/build/nuke/Native/MoltenVK.cs b/build/nuke/Native/MoltenVK.cs index e8161039ac..6c5375d115 100644 --- a/build/nuke/Native/MoltenVK.cs +++ b/build/nuke/Native/MoltenVK.cs @@ -22,16 +22,29 @@ partial class Build { { var runtimes = RootDirectory / "src" / "Native" / "Silk.NET.MoltenVK.Native" / "runtimes"; - InheritedShell($"./fetchDependencies --ios --iossim --maccat --macos", MoltenVKPath).AssertZeroExitCode(); - InheritedShell($"make ios iossim maccat macos", MoltenVKPath).AssertZeroExitCode(); + InheritedShell($"./fetchDependencies --all", MoltenVKPath).AssertZeroExitCode(); + InheritedShell($"make", MoltenVKPath).AssertZeroExitCode(); var xcFrameworkDir = MoltenVKPath / "Package" / "Release" / "MoltenVK" / "static" / "MoltenVK.xcframework"; CopyFile(xcFrameworkDir / "ios-arm64" / "libMoltenVK.a", runtimes / "ios" / "native" / "libMoltenVK.a", FileExistsPolicy.Overwrite); CopyFile(xcFrameworkDir / "ios-arm64_x86_64-simulator" / "libMoltenVK.a", runtimes / "iossimulator" / "native" / "libMoltenVK.a", FileExistsPolicy.Overwrite); CopyFile(xcFrameworkDir / "ios-arm64_x86_64-maccatalyst" / "libMoltenVK.a", runtimes / "maccatalyst" / "native" / "libMoltenVK.a", FileExistsPolicy.Overwrite); - CopyFile(MoltenVKPath / "Package" / "Release" / "MoltenVK" / "dynamic" / "dylib" / "macOS" / "libMoltenVK.dylib", runtimes / "osx" / "native" / "libMoltenVK.dylib", FileExistsPolicy.Overwrite); + CopyFile(xcFrameworkDir / "tvos-arm64_arm64e" / "libMoltenVK.a", runtimes / "tvos" / "native" / "libMoltenVK.a", FileExistsPolicy.Overwrite); + CopyFile(xcFrameworkDir / "tvos-arm64_x86_64-simulator" / "libMoltenVK.a", runtimes / "tvossimulator" / "native" / "libMoltenVK.a", FileExistsPolicy.Overwrite); + + var macOsDylib = runtimes / "osx" / "native" / "libMoltenVK.dylib"; + + CopyFile(MoltenVKPath / "Package" / "Release" / "MoltenVK" / "dynamic" / "dylib" / "macOS" / "libMoltenVK.dylib", macOsDylib, FileExistsPolicy.Overwrite); CopyFile(MoltenVKPath / "Package" / "Release" / "MoltenVK" / "dynamic" / "dylib" / "macOS" / "MoltenVK_icd.json", runtimes / "osx" / "native" / "MoltenVK_icd.json", FileExistsPolicy.Overwrite); + + // Only strip the macOS binary since stripping static libraries is too involved, and + // the final AOT'd binary can be stripped anyway. + InheritedShell($"strip -Sx -no_code_signature_warning {macOsDylib}").AssertZeroExitCode(); + + // Re-sign, as stripping a universal binary invalidates the signature. + InheritedShell($"codesign --remove-signature {macOsDylib}").AssertZeroExitCode(); + InheritedShell($"codesign --sign - {macOsDylib}").AssertZeroExitCode(); } PrUpdatedNativeBinary("MoltenVK"); diff --git a/src/Native/Silk.NET.MoltenVK.Native/runtimes/iossimulator/native/libMoltenVK.a b/src/Native/Silk.NET.MoltenVK.Native/runtimes/iossimulator/native/libMoltenVK.a index 418eeda742..430fdd3b9c 100644 Binary files a/src/Native/Silk.NET.MoltenVK.Native/runtimes/iossimulator/native/libMoltenVK.a and b/src/Native/Silk.NET.MoltenVK.Native/runtimes/iossimulator/native/libMoltenVK.a differ diff --git a/src/Native/Silk.NET.MoltenVK.Native/runtimes/maccatalyst/native/libMoltenVK.a b/src/Native/Silk.NET.MoltenVK.Native/runtimes/maccatalyst/native/libMoltenVK.a index 8ec81d2a78..294b158170 100644 Binary files a/src/Native/Silk.NET.MoltenVK.Native/runtimes/maccatalyst/native/libMoltenVK.a and b/src/Native/Silk.NET.MoltenVK.Native/runtimes/maccatalyst/native/libMoltenVK.a differ diff --git a/src/Native/Silk.NET.MoltenVK.Native/runtimes/osx/native/libMoltenVK.dylib b/src/Native/Silk.NET.MoltenVK.Native/runtimes/osx/native/libMoltenVK.dylib index baf3d77f0c..289f43c99c 100755 Binary files a/src/Native/Silk.NET.MoltenVK.Native/runtimes/osx/native/libMoltenVK.dylib and b/src/Native/Silk.NET.MoltenVK.Native/runtimes/osx/native/libMoltenVK.dylib differ diff --git a/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvos/native/libMoltenVK.a b/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvos/native/libMoltenVK.a new file mode 100644 index 0000000000..806c2acb72 Binary files /dev/null and b/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvos/native/libMoltenVK.a differ diff --git a/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvossimulator/native/libMoltenVK.a b/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvossimulator/native/libMoltenVK.a new file mode 100644 index 0000000000..df93de045c Binary files /dev/null and b/src/Native/Silk.NET.MoltenVK.Native/runtimes/tvossimulator/native/libMoltenVK.a differ