Skip to contentSkip to conversation

build-sys: build vhost-user-gpu only if CONFIG_TOOLS

PATCH In review Paolo Bonzini 4 participants 4 messages Dec 11, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build-sys: build vhost-user-gpu only if CONFIG_TOOLS

From: Marc-André Lureau <[email protected]>

vhost-user-gpu is always built and installed, but it is not part of the emulator proper. Cut it if --disable-tools is specified.

---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index 53823c2..8d921c6 100644
@@ -321,14 +321,10 @@ HELPERS-y =
 
 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
 
-ifdef CONFIG_LINUX
-ifdef CONFIG_VIRGL
-ifdef CONFIG_GBM
+ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
-endif
-endif
 
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

vhost-user-gpu is always built and installed, but it is not part of the emulator proper. Cut it if --disable-tools is specified.

I don't feel like this is something that people would really consider part of "tools" either. This is something you'd only ever use in conjunction with the emulators, so I don't think controlling it with --disable-tools is appropriate.

A new --(enable|disable)-vhost-backends arg looks more desirable to me. Disabling the system emulators should automatically imply --disable-vhost-backends by default too

Quoted 31 lines
---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index 53823c2..8d921c6 100644
@@ -321,14 +321,10 @@ HELPERS-y =
 
 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
 
-ifdef CONFIG_LINUX
-ifdef CONFIG_VIRGL
-ifdef CONFIG_GBM
+ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
-endif
-endif
 
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
Signature · 1 line
1.8.3.1

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 11 lines · * Daniel P. Berrangé ([email protected]) wrote:
Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

vhost-user-gpu is always built and installed, but it is not part of the emulator proper. Cut it if --disable-tools is specified.

I don't feel like this is something that people would really consider part of "tools" either. This is something you'd only ever use in conjunction with the emulators, so I don't think controlling it with --disable-tools is appropriate.

Quoted 4 lines

A new --(enable|disable)-vhost-backends arg looks more desirable to me. Disabling the system emulators should automatically imply --disable-vhost-backends by default too

It feels to me that vhost-backends are a subset of tools.

Dave

Quoted 25 lines
Quoted 25 lines
---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index 53823c2..8d921c6 100644
@@ -321,14 +321,10 @@ HELPERS-y =
 
 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
 
-ifdef CONFIG_LINUX
-ifdef CONFIG_VIRGL
-ifdef CONFIG_GBM
+ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
-endif
-endif
 
Quoted 15 lines
Quoted 6 lines
Makefile +0 -0
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
Signature · 1 line
1.8.3.1

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

Reviewed-by on v1 1/1
#3 lore raw
In reply to Paolo Bonzini
Quoted 18 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

vhost-user-gpu is always built and installed, but it is not part of the emulator proper. Cut it if --disable-tools is specified.

---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +0 -0
index 53823c2..8d921c6 100644
@@ -321,14 +321,10 @@ HELPERS-y =
 
 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)

Makefile HELPERS-y = · line 331

Quoted 10 lines
Makefile +1 -5
 
-ifdef CONFIG_LINUX
-ifdef CONFIG_VIRGL
-ifdef CONFIG_GBM
+ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
-endif
-endif