[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/24] meson: support meson 0.64 -Doptimization=plain
From: |
Paolo Bonzini |
Subject: |
[PULL 16/24] meson: support meson 0.64 -Doptimization=plain |
Date: |
Wed, 21 Dec 2022 19:01:33 +0100 |
In Meson 0.64, the optimization built-in option now accepts the "plain" value,
which will not set any optimization flags. While QEMU does not check the
contents of the option and therefore does not suffer any ill effect
from the new value, it uses get_option to print the optimization flags
in the summary. Clean the code up to remove duplication, and check for
-Doptimization=plain at the same time.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index d61c7a82f112..dbd0b5563446 100644
--- a/meson.build
+++ b/meson.build
@@ -3752,18 +3752,16 @@ endif
if targetos == 'darwin'
summary_info += {'Objective-C compiler': '
'.join(meson.get_compiler('objc').cmd_array())}
endif
-summary_info += {'CFLAGS': ' '.join(get_option('c_args')
- + ['-O' +
get_option('optimization')]
- + (get_option('debug') ? ['-g']
: []))}
+option_cflags = (get_option('debug') ? ['-g'] : [])
+if get_option('optimization') != 'plain'
+ option_cflags += ['-O' + get_option('optimization')]
+endif
+summary_info += {'CFLAGS': ' '.join(get_option('c_args') +
option_cflags)}
if link_language == 'cpp'
- summary_info += {'CXXFLAGS': ' '.join(get_option('cpp_args')
- + ['-O' +
get_option('optimization')]
- + (get_option('debug') ? ['-g']
: []))}
+ summary_info += {'CXXFLAGS': ' '.join(get_option('cpp_args') +
option_cflags)}
endif
if targetos == 'darwin'
- summary_info += {'OBJCFLAGS': ' '.join(get_option('objc_args')
- + ['-O' +
get_option('optimization')]
- + (get_option('debug') ? ['-g']
: []))}
+ summary_info += {'OBJCFLAGS': ' '.join(get_option('objc_args') +
option_cflags)}
endif
link_args = get_option(link_language + '_link_args')
if link_args.length() > 0
--
2.38.1
- [PULL 08/24] configure: remove dead function, (continued)
- [PULL 08/24] configure: remove dead function, Paolo Bonzini, 2022/12/21
- [PULL 10/24] configure: preserve qemu-ga variables, Paolo Bonzini, 2022/12/21
- [PULL 02/24] hw: Reduce "qemu/accel.h" inclusion, Paolo Bonzini, 2022/12/21
- [PULL 07/24] configure: remove useless write_c_skeleton, Paolo Bonzini, 2022/12/21
- [PULL 11/24] configure: remove backwards-compatibility and obsolete options, Paolo Bonzini, 2022/12/21
- [PULL 09/24] configure: cleanup $cpu tests, Paolo Bonzini, 2022/12/21
- [PULL 12/24] meson: tweak hardening options for Windows, Paolo Bonzini, 2022/12/21
- [PULL 13/24] meson: cleanup dummy-cpus.c rules, Paolo Bonzini, 2022/12/21
- [PULL 14/24] tests/qapi-schema: remove Meson workaround, Paolo Bonzini, 2022/12/21
- [PULL 15/24] configure: test all warnings, Paolo Bonzini, 2022/12/21
- [PULL 16/24] meson: support meson 0.64 -Doptimization=plain,
Paolo Bonzini <=
- [PULL 17/24] meson: cleanup compiler detection, Paolo Bonzini, 2022/12/21
- [PULL 19/24] docs: do not talk about past removal as happening in the future, Paolo Bonzini, 2022/12/21
- [PULL 21/24] util: remove support for hex numbers with a scaling suffix, Paolo Bonzini, 2022/12/21
- [PULL 23/24] target/i386: Add SGX aex-notify and EDECCSSA support, Paolo Bonzini, 2022/12/21
- [PULL 20/24] KVM: remove support for kernel-irqchip=off, Paolo Bonzini, 2022/12/21
- [PULL 18/24] meson: accept relative symlinks in "meson introspect --installed" data, Paolo Bonzini, 2022/12/21
- [PULL 24/24] i386: SGX: remove deprecated member of SGXInfo, Paolo Bonzini, 2022/12/21
- [PULL 22/24] util: remove support -chardev tty and -chardev parport, Paolo Bonzini, 2022/12/21