summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2019-09-15 15:56:30 +0200
committerJan Janssen <medhefgo@web.de>2019-10-30 17:34:12 +0100
commit9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0 (patch)
treecf8d1fd3d0527825928aef47075cbfc29f0a688d /src/boot
parentb7db8b7b139fa6cfb6516197d5ac8d10360ac57a (diff)
downloadsystemd-9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0.tar.gz
systemd-9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0.tar.bz2
systemd-9ea4d81c12e8a3f7ee081f9eac7e77256f43b7b0.zip
sd-boot: Only disable optimization on debug builds
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/efi/meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index b8fd5105d0..3edabfedd5 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),