From 7d4953de131657c43c897e4b3ea65d71f380dc34 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 13 May 2022 14:25:32 +0200 Subject: [PATCH] boot: Build with -flto=auto if available Without this, we may get the following warning with gcc-12: lto-wrapper: warning: using serial compilation of 2 LTRANS jobs --- src/boot/efi/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 299a01b9be..e17669478f 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -223,7 +223,7 @@ if get_option('b_ndebug') == 'true' or ( efi_cflags += ['-DNDEBUG'] endif if get_option('b_lto') - efi_cflags += ['-flto'] + efi_cflags += cc.has_argument('-flto=auto') ? ['-flto=auto'] : ['-flto'] endif foreach arg : get_option('c_args') -- 2.25.1