aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-19 06:56:16 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-03 09:42:53 -0500
commita5cb7c5afe717d42ae8845cd4b8805ea17b3f64d (patch)
tree58814855691a9927ff92bc0017d0e6036200cab1 /meson.build
parentfd250172842b3bbd4213242eb83bd5fa989f7381 (diff)
meson: use b_staticpic=false for meson >=0.56.0
Meson 0.56.0 correctly builds non-PIC static libraries with -fPIE if b_pie=true. We do not have to pass b_staticpic=true if PIE is requested if Meson is new-enough, which improves performance. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 39ac5cf6d8..f5175010df 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('qemu', ['c'], meson_version: '>=0.55.0',
- default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11',
- 'b_colorout=auto'],
+ default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] +
+ (meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []),
version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
not_found = dependency('', required: false)