From: Jan Janssen Date: Sun, 15 Sep 2019 13:56:30 +0000 (+0200) Subject: sd-boot: Only disable optimization on debug builds X-Git-Tag: v244-rc1~122^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0;p=thirdparty%2Fsystemd.git sd-boot: Only disable optimization on debug builds --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index b8fd5105d04..3edabfedd53 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -113,7 +113,6 @@ if have_gnu_efi '-Wextra', '-std=gnu90', '-nostdinc', - '-ggdb', '-O0', '-fpic', '-fshort-wchar', '-ffreestanding', @@ -138,6 +137,13 @@ if have_gnu_efi if get_option('werror') == true compile_args += ['-Werror'] endif + if get_option('buildtype') == 'debug' + compile_args += ['-ggdb', '-O0'] + elif get_option('buildtype') == 'debugoptimized' + compile_args += ['-ggdb', '-Og'] + else + compile_args += ['-O2'] + endif efi_ldflags = ['-T', join_paths(efi_ldsdir, arch_lds),