Skip to contentSkip to conversation

build: do not include @block.syms/@qemu.sys with modules disabled

PATCH Superseded Paolo Bonzini 1 participant 1 message Dec 4, 2025 Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: do not include @block.syms/@qemu.sys with modules disabled

Including specific symbols used by modules is not necessary for monolithic executables. This avoids a failure where emcc does not support @file syntax inside a response file---which in turn breaks the WebAssembly build if the command line is long enough that meson decides to use a response file.

---
 meson.build | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meson.build +5 -4
index e6a11cefdb7..df1067b4067 100644
@@ -4270,7 +4270,7 @@ foreach target : target_dirs
 
     c_args += ['-DCONFIG_DEVICES="@[email protected]"'.format(target)]
     arch_srcs += config_devices_h[target]
-    link_args += ['@block.syms', '@qemu.syms']
+    link_args += enable_modules ? ['@block.syms', '@qemu.syms'] : []
   else
     abi = config_target['TARGET_ABI_DIR']
     target_type='user'
@@ -4499,14 +4499,15 @@ if xkbcommon.found()
 endif
 
 if have_tools
+  link_args += enable_modules ? ['@block.syms'] : []
   qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
-             link_args: '@block.syms', link_depends: block_syms,
+             link_args: link_args, link_depends: block_syms,
              dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
   qemu_io = executable('qemu-io', files('qemu-io.c'),
-             link_args: '@block.syms', link_depends: block_syms,
+             link_args: link_args, link_depends: block_syms,
              dependencies: [block, qemuutil], install: true)
   qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
-               link_args: '@block.syms', link_depends: block_syms,
+               link_args: link_args, link_depends: block_syms,
                dependencies: [blockdev, qemuutil, selinux],
                install: true)
 
Signature · 1 line
2.52.0