From a2fce222f2948ec8b20edb28e261ffe5423f404b Mon Sep 17 00:00:00 2001 From: Splendide Imaginarius <119545140+Splendide-Imaginarius@users.noreply.github.com> Date: Tue, 17 Oct 2023 05:37:10 +0000 Subject: [PATCH] Build with static libgcc on Windows Avoids needing to ship libgcc_s_seh-1.dll with the binaries. --- src/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index 487b65b0..7012e5ee 100755 --- a/src/meson.build +++ b/src/meson.build @@ -47,7 +47,8 @@ if host_system == 'windows' endif if build_static == true if host_system == 'windows' - global_link_args += ['-Wl,-Bstatic', '-lgcc', '-lstdc++', '-lpthread', '-Wl,-Bdynamic'] + # '-static-libgcc', '-static-libstdc++' are here to avoid needing to ship a separate libgcc_s_seh-1.dll on Windows; it still works without those flags if you have the dll. + global_link_args += ['-static-libgcc', '-static-libstdc++', '-Wl,-Bstatic', '-lgcc', '-lstdc++', '-lpthread', '-Wl,-Bdynamic'] else global_link_args += ['-static-libgcc', '-static-libstdc++'] endif