From d3ebb7ccf457e99acecdb4ffcc2a4087392b0c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 9 Apr 2024 12:17:02 +0200 Subject: [PATCH] Native/Vulkan Loader: Strip Linux/macOS binaries after build. --- build/nuke/Native/VulkanLoader.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/nuke/Native/VulkanLoader.cs b/build/nuke/Native/VulkanLoader.cs index 4573843b7b..ac92bf273d 100644 --- a/build/nuke/Native/VulkanLoader.cs +++ b/build/nuke/Native/VulkanLoader.cs @@ -72,6 +72,8 @@ partial class Build { InheritedShell($"{prepare} {GetCMakeToolchainFlag(triple)}", buildDir).AssertZeroExitCode(); InheritedShell(build, buildDir).AssertZeroExitCode(); + InheritedShell($"{triple}-strip --strip-unneeded loader/libvulkan.so", buildDir).AssertZeroExitCode(); + CopyAll((buildDir / "loader").GlobFiles("libvulkan.so"), runtimes / rid / "native"); } } @@ -88,6 +90,8 @@ partial class Build { InheritedShell($"{prepare} -DCMAKE_OSX_ARCHITECTURES={arch}", buildDir).AssertZeroExitCode(); InheritedShell(build, buildDir).AssertZeroExitCode(); + InheritedShell($"strip -Sx loader/libvulkan.dylib", buildDir).AssertZeroExitCode(); + CopyAll((buildDir / "loader").GlobFiles("libvulkan.dylib"), runtimes / rid / "native"); } }