@@ -1,4 +1,8 @@
-specific_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c'))
-specific_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
-specific_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
-specific_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
+accel_stubs_ss = ss.source_set()
+
+accel_stubs_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c'))
+accel_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
+accel_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
+accel_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
+
+specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: accel_stubs_ss)
This system-mode emulation stubs are not require in user-mode binaries. Restrict them to system-mode binaries. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- accel/stubs/meson.build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)