Merge pull request #52 from Splendide-Imaginarius/mkxp-z-static-libgcc-windows

Build with static libgcc on Windows
This commit is contained in:
Splendide Imaginarius 2023-10-17 12:09:21 +00:00 committed by GitHub
commit 986875a144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,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