[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/36] meson: honor --enable-rbd if cc.links test fails
From: |
Paolo Bonzini |
Subject: |
[PULL 11/36] meson: honor --enable-rbd if cc.links test fails |
Date: |
Fri, 29 Jan 2021 12:17:49 +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 688124d3da..14e4cb35df 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 05/36] fuzz: enable dynamic args for generic-fuzz configs, (continued)
- [PULL 05/36] fuzz: enable dynamic args for generic-fuzz configs, Paolo Bonzini, 2021/01/29
- [PULL 08/36] target/i386: do not set LM for 32-bit emulation "-cpu host/max", Paolo Bonzini, 2021/01/29
- [PULL 09/36] machine: add missing doc for memory-backend option, Paolo Bonzini, 2021/01/29
- [PULL 03/36] docs/fuzz: fix pre-meson path, Paolo Bonzini, 2021/01/29
- [PULL 06/36] docs/fuzz: add some information about OSS-Fuzz, Paolo Bonzini, 2021/01/29
- [PULL 07/36] fuzz: add virtio-9p configurations for fuzzing, Paolo Bonzini, 2021/01/29
- [PULL 10/36] meson: accept either shared or static libraries if --disable-static, Paolo Bonzini, 2021/01/29
- [PULL 12/36] x86/cpu: Populate SVM CPUID feature bits, Paolo Bonzini, 2021/01/29
- [PULL 16/36] event_notifier: handle initialization failure better, Paolo Bonzini, 2021/01/29
- [PULL 14/36] docs: don't install corresponding man page if guest agent is disabled, Paolo Bonzini, 2021/01/29
- [PULL 11/36] meson: honor --enable-rbd if cc.links test fails,
Paolo Bonzini <=
- [PULL 17/36] target/i386: Fix decoding of certain BMI instructions, Paolo Bonzini, 2021/01/29
- [PULL 13/36] fuzz: fix wrong index in clear_bits, Paolo Bonzini, 2021/01/29
- [PULL 18/36] target/i86: implement PKS, Paolo Bonzini, 2021/01/29
- [PULL 15/36] virtio-scsi: don't uninitialize queues that we didn't initialize, Paolo Bonzini, 2021/01/29
- [PULL 22/36] meson: Warn when TCI is selected but TCG backend is available, Paolo Bonzini, 2021/01/29
- [PULL 19/36] configure: Fix --enable-tcg-interpreter, Paolo Bonzini, 2021/01/29
- [PULL 20/36] configure: Improve TCI feature description, Paolo Bonzini, 2021/01/29
- [PULL 21/36] meson: Explicit TCG backend used, Paolo Bonzini, 2021/01/29
- [PULL 26/36] pc-bios/meson: Only install EDK2 blob firmwares with system emulation, Paolo Bonzini, 2021/01/29
- [PULL 24/36] build-sys: make libslirp a meson subproject, Paolo Bonzini, 2021/01/29