Commit 9777545e7f for qemu.org

commit 9777545e7fcc13e7f34117513b8904ca26a7c276
Author: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Date:   Fri Mar 27 15:44:01 2026 +0200

    meson: Don't require nm for non-modular builds

    In the MSVC build environment, nm is missing; at the same time,
    scripts/undefsym.py exits with code 0 at the beginning
    for non-modular builds.

    So, this change is harmless because it already didn't do anything
    in non-modular builds, but remove the additional tool requirements.

    Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
    Link: https://lore.kernel.org/r/20260327134401.270186-16-kkostiuk@redhat.com
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

diff --git a/meson.build b/meson.build
index 09cdd31769..a962b181e6 100644
--- a/meson.build
+++ b/meson.build
@@ -3906,6 +3906,9 @@ modinfo_generate = find_program('scripts/modinfo-generate.py')
 modinfo_files = []
 audio_modinfo_files = []

+block_syms = []
+qemu_syms = []
+
 block_mods = []
 system_mods = []
 emulator_modules = []
@@ -4021,18 +4024,18 @@ if enable_modules
   if emulator_modules.length() > 0
     alias_target('modules', emulator_modules)
   endif
-endif

-nm = find_program('nm')
-undefsym = find_program('scripts/undefsym.py')
-block_syms = custom_target('block.syms', output: 'block.syms',
-                             input: [libqemuutil, block_mods],
-                             capture: true,
-                             command: [undefsym, nm, '@INPUT@'])
-qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
-                             input: [libqemuutil, system_mods],
-                             capture: true,
-                             command: [undefsym, nm, '@INPUT@'])
+  nm = find_program('nm')
+  undefsym = find_program('scripts/undefsym.py')
+  block_syms = custom_target('block.syms', output: 'block.syms',
+                              input: [libqemuutil, block_mods],
+                              capture: true,
+                              command: [undefsym, nm, '@INPUT@'])
+  qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
+                              input: [libqemuutil, system_mods],
+                              capture: true,
+                              command: [undefsym, nm, '@INPUT@'])
+endif

 authz_ss = authz_ss.apply({})
 libauthz = static_library('authz', authz_ss.sources() + genh,