]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: Only disable optimization on debug builds
authorJan Janssen <medhefgo@web.de>
Sun, 15 Sep 2019 13:56:30 +0000 (15:56 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 30 Oct 2019 16:34:12 +0000 (17:34 +0100)
src/boot/efi/meson.build

index b8fd5105d0437571b3391f718f8efbae6023bf4d..3edabfedd536f2d199c3fcbdb3f19ab58b8b4b7c 100644 (file)
@@ -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),