meson: For windows, the with_ld_version_script won't take effect

On windows, both msvc/gcc are using vs_module_defs to export symbols. So avoid use with_ld_version_script on win32

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37289>
This commit is contained in:
Yonggang Luo 2023-12-15 18:50:09 +08:00 committed by Marge Bot
parent 3c8ea260d0
commit 1758bc32cc

View file

@ -1490,7 +1490,7 @@ if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbol
ld_args_bsymbolic += '-Wl,-Bsymbolic'
endif
with_ld_version_script = false
if cc.links('int main() { return 0; }',
if host_machine.system() != 'windows' and cc.links('int main() { return 0; }',
args : '-Wl,--version-script=@0@'.format(
join_paths(meson.current_source_dir(), 'build-support/conftest.map')),
name : 'version-script')