aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-26 15:28:51 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-10-29 06:37:24 +0100
commit43376ccc8d2ceb64e281f0032897df80b6d0251a (patch)
treeb0108d84b0a7de0b54341c4028937fd7e613c88e
parent1e1f9c20bc0bdd4cf11cfe5057465d484b611858 (diff)
downloadqemu-43376ccc8d2ceb64e281f0032897df80b6d0251a.zip
qemu-43376ccc8d2ceb64e281f0032897df80b6d0251a.tar.gz
qemu-43376ccc8d2ceb64e281f0032897df80b6d0251a.tar.bz2
virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y
There is no actual code in the CONFIG_VIRGL=n case. So building is (a) pointless and (b) makes macos ranlib complain. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201026142851.28735-1-kraxel@redhat.com
-rw-r--r--hw/display/meson.build4
-rw-r--r--hw/display/virtio-gpu-3d.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/hw/display/meson.build b/hw/display/meson.build
index 11ea289..dad3bd2 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -57,7 +57,9 @@ softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d
if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
virtio_gpu_ss = ss.source_set()
virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
- if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
+ if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman, virgl])
+ virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL'],
+ if_true: [files('virtio-gpu-3d.c'), pixman, virgl])
virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
endif
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 1bd33d7..0b0c114 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -17,8 +17,6 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-gpu.h"
-#ifdef CONFIG_VIRGL
-
#include <virglrenderer.h>
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
@@ -633,5 +631,3 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
return capset2_max_ver ? 2 : 1;
}
-
-#endif /* CONFIG_VIRGL */