[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/46] meson: honor --enable-rbd if cc.links test fails
From: |
Paolo Bonzini |
Subject: |
[PULL 11/46] meson: honor --enable-rbd if cc.links test fails |
Date: |
Mon, 8 Feb 2021 19:22:56 +0100 |
If the link test failed, compilation proceeded with RBD disabled,
even if --enable-rbd was used on the configure command line.
Fix that.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 6d6537d74a..5bd22f431a 100644
--- a/meson.build
+++ b/meson.build
@@ -690,15 +690,21 @@ if not get_option('rbd').auto() or have_block
librbd = cc.find_library('rbd', has_headers: ['rbd/librbd.h'],
required: get_option('rbd'),
kwargs: static_kwargs)
- if librados.found() and librbd.found() and cc.links('''
- #include <stdio.h>
- #include <rbd/librbd.h>
- int main(void) {
- rados_t cluster;
- rados_create(&cluster, NULL);
- return 0;
- }''', dependencies: [librbd, librados])
- rbd = declare_dependency(dependencies: [librbd, librados])
+ if librados.found() and librbd.found()
+ if cc.links('''
+ #include <stdio.h>
+ #include <rbd/librbd.h>
+ int main(void) {
+ rados_t cluster;
+ rados_create(&cluster, NULL);
+ return 0;
+ }''', dependencies: [librbd, librados])
+ rbd = declare_dependency(dependencies: [librbd, librados])
+ elif get_option('rbd').enabled()
+ error('could not link librados')
+ else
+ warning('could not link librados, disabling')
+ endif
endif
endif
--
2.29.2
- [PULL 06/46] docs/fuzz: add some information about OSS-Fuzz, (continued)
- [PULL 06/46] docs/fuzz: add some information about OSS-Fuzz, Paolo Bonzini, 2021/02/08
- [PULL 04/46] fuzz: log the arguments used to initialize QEMU, Paolo Bonzini, 2021/02/08
- [PULL 05/46] fuzz: enable dynamic args for generic-fuzz configs, Paolo Bonzini, 2021/02/08
- [PULL 02/46] fuzz: refine the ide/ahci fuzzer configs, Paolo Bonzini, 2021/02/08
- [PULL 08/46] target/i386: do not set LM for 32-bit emulation "-cpu host/max", Paolo Bonzini, 2021/02/08
- [PULL 07/46] fuzz: add virtio-9p configurations for fuzzing, Paolo Bonzini, 2021/02/08
- [PULL 01/46] fuzz: ignore address_space_map is_write flag, Paolo Bonzini, 2021/02/08
- [PULL 13/46] fuzz: fix wrong index in clear_bits, Paolo Bonzini, 2021/02/08
- [PULL 09/46] machine: add missing doc for memory-backend option, Paolo Bonzini, 2021/02/08
- [PULL 14/46] docs: don't install corresponding man page if guest agent is disabled, Paolo Bonzini, 2021/02/08
- [PULL 11/46] meson: honor --enable-rbd if cc.links test fails,
Paolo Bonzini <=
- [PULL 16/46] event_notifier: handle initialization failure better, Paolo Bonzini, 2021/02/08
- [PULL 10/46] meson: accept either shared or static libraries if --disable-static, Paolo Bonzini, 2021/02/08
- [PULL 12/46] x86/cpu: Populate SVM CPUID feature bits, Paolo Bonzini, 2021/02/08
- [PULL 15/46] virtio-scsi: don't uninitialize queues that we didn't initialize, Paolo Bonzini, 2021/02/08
- [PULL 17/46] target/i386: Fix decoding of certain BMI instructions, Paolo Bonzini, 2021/02/08
- [PULL 20/46] meson: Explicit TCG backend used, Paolo Bonzini, 2021/02/08
- [PULL 18/46] target/i86: implement PKS, Paolo Bonzini, 2021/02/08
- [PULL 19/46] configure: Improve TCI feature description, Paolo Bonzini, 2021/02/08
- [PULL 21/46] meson: Warn when TCI is selected but TCG backend is available, Paolo Bonzini, 2021/02/08
- [PULL 22/46] tests/meson: Only build softfloat objects if TCG is selected, Paolo Bonzini, 2021/02/08