Skip to contentSkip to conversation

block: always link with zlib

PATCH In review Paolo Bonzini 3 participants 3 messages Aug 28, 2020 – Aug 31, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: always link with zlib

The qcow2 driver needs the zlib dependency. While emulators provided it through the migration code, this is not true of the tools. Move the dependency from the qcow1 rule directly into block_ss so that it is included unconditionally.

Fixes build with --disable-qcow1.

---
 block/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/meson.build +2 -2
index 4dbbfe60b4..a3e56b7cd1 100644
@@ -40,9 +40,9 @@ block_ss.add(files(
   'vmdk.c',
   'vpc.c',
   'write-threshold.c',
-), zstd)
+), zstd, zlib)
 
-block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
+block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Paolo Bonzini

The qcow2 driver needs the zlib dependency. While emulators provided it through the migration code, this is not true of the tools. Move the dependency from the qcow1 rule directly into block_ss so that it is included unconditionally.

Fixes build with --disable-qcow1.

---
 block/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/meson.build +0 -0
index 4dbbfe60b4..a3e56b7cd1 100644
@@ -40,9 +40,9 @@ block_ss.add(files(
   'vmdk.c',

block/meson.build block_ss.add(files( · line 48

Quoted 10 lines
block/meson.build +2 -2
   'vpc.c',
   'write-threshold.c',
-), zstd)
+), zstd, zlib)
 
-block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
+block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

The qcow2 driver needs the zlib dependency. While emulators provided it through the migration code, this is not true of the tools. Move the dependency from the qcow1 rule directly into block_ss so that it is included unconditionally.

Fixes build with --disable-qcow1.

---

Quoted 24 lines
 block/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/meson.build +2 -3
index 4dbbfe60b4..a3e56b7cd1 100644
@@ -40,9 +40,9 @@ block_ss.add(files(
   'vmdk.c',
   'vpc.c',
   'write-threshold.c',
-), zstd)
+), zstd, zlib)
 
-block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
+block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
--

2.26.2