aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-09-26 17:20:53 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-18 10:01:01 +0200
commitae22ae651515045ea06eac9abc55dacbfd616bd4 (patch)
tree2feb99a2f5f99b9946d2aaae4edf7d7e40c09263
parent655e2a778dd701822bbe0bf90dad74c25bb05e49 (diff)
downloadqemu-ae22ae651515045ea06eac9abc55dacbfd616bd4.zip
qemu-ae22ae651515045ea06eac9abc55dacbfd616bd4.tar.gz
qemu-ae22ae651515045ea06eac9abc55dacbfd616bd4.tar.bz2
configure: clean up handling of CFI option
Avoid that --enable-cfi --disable-cfi leaves b_lto set to true. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xconfigure13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure b/configure
index d6103a0..9f78205 100755
--- a/configure
+++ b/configure
@@ -625,7 +625,10 @@ meson_option_build_array() {
meson_options=
meson_option_add() {
- meson_options="$meson_options $(quote_sh "$1")"
+ local arg
+ for arg; do
+ meson_options="$meson_options $(quote_sh "$arg")"
+ done
}
meson_option_parse() {
meson_options="$meson_options $(_meson_option_parse "$@")"
@@ -767,11 +770,9 @@ for opt do
;;
--disable-werror) werror="no"
;;
- --enable-cfi)
- cfi="true";
- meson_option_add -Db_lto=true
+ --enable-cfi) cfi=true
;;
- --disable-cfi) cfi="false"
+ --disable-cfi) cfi=false
;;
--disable-download) download="disabled"; git_submodules_action=validate;
;;
@@ -1845,7 +1846,7 @@ if test "$skip_meson" = no; then
test "$werror" = yes && meson_option_add -Dwerror=true
# QEMU options
- test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
+ test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
test "$plugins" = yes && meson_option_add "-Dplugins=true"