[PATCH-for-9.1 7/7] hw: Include minimal source set in user emulation build

Philippe Mathieu-Daudé posted 7 patches 1 year, 10 months ago
Maintainers: Jason Wang <jasowang@redhat.com>, Andrew Melnychenko <andrew@daynix.com>, Yuri Benditovich <yuri.benditovich@daynix.com>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH-for-9.1 7/7] hw: Include minimal source set in user emulation build
Posted by Philippe Mathieu-Daudé 1 year, 10 months ago
Only the files in hwcore_ss[] are required to link
a user emulation binary.

Have meson process the hw/ sub-directories if system
emulation is selected, otherwise directly process
hw/core/ to get hwcore_ss[], which is the only set
required by user emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index c9c3217ba4..68eecd1937 100644
--- a/meson.build
+++ b/meson.build
@@ -3447,8 +3447,12 @@ subdir('qom')
 subdir('authz')
 subdir('crypto')
 subdir('ui')
-subdir('hw')
 subdir('gdbstub')
+if have_system
+  subdir('hw')
+else
+  subdir('hw/core')
+endif
 
 if enable_modules
   libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_args: '-DBUILD_DSO')
-- 
2.41.0


Re: [PATCH-for-9.1 7/7] hw: Include minimal source set in user emulation build
Posted by Richard Henderson 1 year, 10 months ago
On 4/4/24 09:47, Philippe Mathieu-Daudé wrote:
> Only the files in hwcore_ss[] are required to link
> a user emulation binary.
> 
> Have meson process the hw/ sub-directories if system
> emulation is selected, otherwise directly process
> hw/core/ to get hwcore_ss[], which is the only set
> required by user emulation.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   meson.build | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~