Skip to content
Snippets Groups Projects
Commit 43376ccc authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201026142851.28735-1-kraxel@redhat.com
parent 1e1f9c20
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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 */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment