qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] configure: Add --enable-lto


From: Richard Henderson
Subject: [PATCH] configure: Add --enable-lto
Date: Sat, 3 Dec 2022 18:03:40 -0600

Separately control b_lto without --enable-cfi.
Also add --disable-lto for completeness.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 configure | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 26c7bc5154..d9c9babfc3 100755
--- a/configure
+++ b/configure
@@ -301,6 +301,7 @@ fdt="auto"
 # 2. Automatically enable/disable other options
 tcg="auto"
 cfi="false"
+lto="true"
 
 # parse CC options second
 for opt do
@@ -837,12 +838,14 @@ for opt do
   ;;
   --disable-safe-stack) safe_stack="no"
   ;;
-  --enable-cfi)
-      cfi="true";
-      meson_option_add -Db_lto=true
+  --enable-cfi) cfi="true" lto="true"
   ;;
   --disable-cfi) cfi="false"
   ;;
+  --enable-lto) lto="true"
+  ;;
+  --disable-lto) lto="false"
+  ;;
   --disable-fdt) fdt="disabled"
   ;;
   --enable-fdt) fdt="enabled"
@@ -2591,6 +2594,7 @@ if test "$skip_meson" = no; then
   test "$default_feature" = no && meson_option_add -Dauto_features=disabled
   test "$pie" = no && meson_option_add -Db_pie=false
   test "$werror" = yes && meson_option_add -Dwerror=true
+  test "$lto" = true && meson_option_add "-Db_lto=true"
 
   # QEMU options
   test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]