From 32116c80b5dcd8fab1125739de7b62718b497d5b Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 15 May 2025 22:38:55 +0200 Subject: [PATCH] meson: only generate CodeView .pdb symbols on Windows with CLang. GCC experiences breakages, which in particular is a problem for our Windows 32-bit build. See: * https://gitlab.gnome.org/GNOME/gimp/-/issues/13881 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120051 --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f13104c87..2e1b2646e 100644 --- a/meson.build +++ b/meson.build @@ -202,7 +202,7 @@ endif # Generate native .pdb (CodeView) debug symbols (for DIA or DbgHelp debuggers and LLDB) pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=') -if os_win32 and pdb_support +if os_win32 and pdb_support and cc.get_id() == 'clang' cflags_common += '-gcodeview' lflags_common += '-Wl,--pdb=' endif @@ -537,7 +537,7 @@ build_reference = get_option('gtk-doc') or build_gi_docgen # Install native debug data (.pdb) on Windows # Ideally meson should take care of it automatically. # See: https://github.com/mesonbuild/meson/issues/12977 -if os_win32 and pdb_support +if os_win32 and pdb_support and cc.get_id() == 'clang' install_win_debug_script = find_program('./meson_install_win_debug.py') meson.add_install_script(install_win_debug_script) endif -- 2.49.0