Automatically set b_vscrt on Windows

This commit is contained in:
Tamás Bálint Misius 2024-11-07 18:24:26 +01:00
parent b46f35c1e5
commit 809ae3ae93
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
2 changed files with 9 additions and 8 deletions

12
.github/build.sh vendored
View File

@ -231,14 +231,10 @@ if [[ $PACKAGE_MODE == backendvs ]]; then
fi
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
meson_configure+=$'\t'-Dstatic=prebuilt
if [[ $BSH_HOST_PLATFORM == windows ]]; then
if [[ $BSH_HOST_LIBC == msvc ]]; then
meson_configure+=$'\t'-Db_vscrt=static_from_buildtype
else
c_link_args+=\'-static\',
c_link_args+=\'-static-libgcc\',
c_link_args+=\'-static-libstdc++\',
fi
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-mingw ]]; then
c_link_args+=\'-static\',
c_link_args+=\'-static-libgcc\',
c_link_args+=\'-static-libstdc++\',
elif [[ $BSH_HOST_PLATFORM == linux ]]; then
c_link_args+=\'-static-libgcc\',
c_link_args+=\'-static-libstdc++\',

View File

@ -358,6 +358,11 @@ if host_platform == 'windows'
endif
endforeach
endif
if tpt_libs_static == 'static' and host_libc == 'msvc'
target_options += [
'b_vscrt=static_from_buildtype',
]
endif
foreach def : defs_ccomp_win
if cpp_compiler.get_argument_syntax() == 'msvc'
args_ccomp_win += [ '/D' + def ]