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>
Kostiantyn Kostiuk committed
Mar 27, 2026 at 15:44 UTC
9777545e7fcc13e7f34117513b8904ca26a7c276
1 file changed
+14
-11
meson.build
+14
-11
@@ -3906,6 +3906,9 @@ modinfo_generate = find_program('scripts/modinfo-generate.py')
3906
modinfo_files = []
3907
audio_modinfo_files = []
3908
3909
+block_syms = []
3910
+qemu_syms = []
3911
+
3912
block_mods = []
3913
system_mods = []
3914
emulator_modules = []
@@ -4021,18 +4024,18 @@ if enable_modules
4024
if emulator_modules.length() > 0
4025
alias_target('modules', emulator_modules)
4026
endif
4024
-endif
4027
4026
-nm = find_program('nm')
4027
-undefsym = find_program('scripts/undefsym.py')
4028
-block_syms = custom_target('block.syms', output: 'block.syms',
4029
- input: [libqemuutil, block_mods],
4030
- capture: true,
4031
- command: [undefsym, nm, '@INPUT@'])
4032
-qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
4033
- input: [libqemuutil, system_mods],
4034
- capture: true,
4035
- command: [undefsym, nm, '@INPUT@'])
4028
+ nm = find_program('nm')
4029
+ undefsym = find_program('scripts/undefsym.py')
4030
+ block_syms = custom_target('block.syms', output: 'block.syms',
4031
+ input: [libqemuutil, block_mods],
4032
+ capture: true,
4033
+ command: [undefsym, nm, '@INPUT@'])
4034
+ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
4035
+ input: [libqemuutil, system_mods],
4036
+ capture: true,
4037
+ command: [undefsym, nm, '@INPUT@'])
4038
+endif
4039
4040
authz_ss = authz_ss.apply({})
4041
libauthz = static_library('authz', authz_ss.sources() + genh,