mbox series

[0/3] accel: Remove system-mode stubs from user-mode builds

Message ID 20201109094547.2456385-1-f4bug@amsat.org
Headers show
Series accel: Remove system-mode stubs from user-mode builds | expand

Message

Philippe Mathieu-Daudé Nov. 9, 2020, 9:45 a.m. UTC
It is pointless to build/link these stubs into user-mode binaries.

Philippe Mathieu-Daudé (3):
  accel: Only include TCG stubs in user-mode only builds
  accel/stubs: Restrict system-mode emulation stubs
  accel/stubs: Simplify kvm-stub.c

 accel/stubs/kvm-stub.c  |  5 -----
 accel/meson.build       | 10 ++++++----
 accel/stubs/meson.build | 12 ++++++++----
 3 files changed, 14 insertions(+), 13 deletions(-)

-- 
2.26.2

Comments

Claudio Fontana Nov. 9, 2020, 9:55 a.m. UTC | #1
On 11/9/20 10:45 AM, Philippe Mathieu-Daudé wrote:
> We only require TCG stubs in user-mode emulation.
> Do not build stubs restricted to system-mode emulation
> in a user-mode only build.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  accel/meson.build | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/accel/meson.build b/accel/meson.build
> index b26cca227a4..609772f129b 100644
> --- a/accel/meson.build
> +++ b/accel/meson.build
> @@ -1,10 +1,12 @@
>  softmmu_ss.add(files('accel.c'))
>  
> -subdir('qtest')
> -subdir('kvm')
>  subdir('tcg')
> -subdir('xen')
> -subdir('stubs')
> +if have_system
> +  subdir('qtest')
> +  subdir('kvm')
> +  subdir('xen')
> +  subdir('stubs')
> +endif
>  
>  dummy_ss = ss.source_set()
>  dummy_ss.add(files(
> 

Ciao Philippe,

I thought that the pattern used by Paolo was, recurse always, and put the check inside the recursed dir meson.build .
Paolo did you indeed intend meson use this way?

Ciao,

Claudio
Paolo Bonzini Nov. 9, 2020, 10:50 a.m. UTC | #2
On 09/11/20 10:45, Philippe Mathieu-Daudé wrote:
> It is pointless to build/link these stubs into user-mode binaries.
> 
> Philippe Mathieu-Daudé (3):
>    accel: Only include TCG stubs in user-mode only builds
>    accel/stubs: Restrict system-mode emulation stubs
>    accel/stubs: Simplify kvm-stub.c
> 
>   accel/stubs/kvm-stub.c  |  5 -----
>   accel/meson.build       | 10 ++++++----
>   accel/stubs/meson.build | 12 ++++++++----
>   3 files changed, 14 insertions(+), 13 deletions(-)
> 

The series makes sense.  It probably also shows that it makes sense to 
have a "specific_softmmu_ss" sourceset in meson.build.  Let's review 
Alex Bennée's patches and then get back to this one.

Paolo