@samitouri / QOSamiQemu / commits / e78cc345db

accel/stubs: Build stubs once

Move stubs to the global stub_ss[] source set. These files are now built once for all binaries, instead of one time per system binary. Inspired-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260225044225.64059-1-philmd@linaro.org>

Philippe Mathieu-Daudé committed Feb 25, 2026 at 05:35 UTC e78cc345dbb242649fe55eeff3d61d63d8fdbaac
1 file changed +10 -11
accel/stubs/meson.build
+10 -11
@@ -1,11 +1,10 @@
1 -system_stubs_ss = ss.source_set()
2 -system_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
3 -system_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
4 -system_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
5 -system_stubs_ss.add(when: 'CONFIG_HVF', if_false: files('hvf-stub.c'))
6 -system_stubs_ss.add(when: 'CONFIG_NITRO', if_false: files('nitro-stub.c'))
7 -system_stubs_ss.add(when: 'CONFIG_NVMM', if_false: files('nvmm-stub.c'))
8 -system_stubs_ss.add(when: 'CONFIG_WHPX', if_false: files('whpx-stub.c'))
9 -system_stubs_ss.add(when: 'CONFIG_MSHV', if_false: files('mshv-stub.c'))
10 -
11 -specific_ss.add_all(when: ['CONFIG_SYSTEM_ONLY'], if_true: system_stubs_ss)
1 +stub_ss.add(files(
2 + 'hvf-stub.c',
3 + 'kvm-stub.c',
4 + 'nitro-stub.c',
5 + 'mshv-stub.c',
6 + 'nvmm-stub.c',
7 + 'tcg-stub.c',
8 + 'whpx-stub.c',
9 + 'xen-stub.c',
10 +))