[PATCH] accel/qtest: Build once as common object

Philippe Mathieu-Daudé posted 1 patch 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260225053408.18426-1-philmd@linaro.org
Maintainers: Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
meson.build             | 3 ---
accel/qtest/meson.build | 5 ++++-
2 files changed, 4 insertions(+), 4 deletions(-)
[PATCH] accel/qtest: Build once as common object
Posted by Philippe Mathieu-Daudé 1 month, 2 weeks ago
No code within qtest.c uses target-specific knowledge:
build it once as target-agnostic common unit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 meson.build             | 3 ---
 accel/qtest/meson.build | 5 ++++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 5fecd6103a6..033d8cc1a0a 100644
--- a/meson.build
+++ b/meson.build
@@ -3867,9 +3867,6 @@ subdir('linux-user')
 subdir('tests/qtest/libqos')
 subdir('tests/qtest/fuzz')
 
-# accel modules
-target_modules += { 'accel' : { 'qtest': qtest_module_ss }}
-
 ##############################################
 # Internal static_libraries and dependencies #
 ##############################################
diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build
index 2018de8a05d..e1b089e02c7 100644
--- a/accel/qtest/meson.build
+++ b/accel/qtest/meson.build
@@ -1 +1,4 @@
-qtest_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files('qtest.c'))
+qtest_module_ss = ss.source_set()
+qtest_module_ss.add(files('qtest.c'))
+
+modules += {'accel': {'qtest': qtest_module_ss}}
-- 
2.52.0


Re: [PATCH] accel/qtest: Build once as common object
Posted by Philippe Mathieu-Daudé 1 month ago
On 25/2/26 06:34, Philippe Mathieu-Daudé wrote:
> No code within qtest.c uses target-specific knowledge:
> build it once as target-agnostic common unit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   meson.build             | 3 ---
>   accel/qtest/meson.build | 5 ++++-
>   2 files changed, 4 insertions(+), 4 deletions(-)

Patch queued, thanks.

Re: [PATCH] accel/qtest: Build once as common object
Posted by Pierrick Bouvier 1 month, 2 weeks ago
On 2/24/26 9:34 PM, Philippe Mathieu-Daudé wrote:
> No code within qtest.c uses target-specific knowledge:
> build it once as target-agnostic common unit.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   meson.build             | 3 ---
>   accel/qtest/meson.build | 5 ++++-
>   2 files changed, 4 insertions(+), 4 deletions(-)
> 

It seems like it was not needed to have it per target indeed.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>