1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

meson: Fix build with --optimization=plain

Note that -O0 is deliberately filtered out as we have to compile with at
least -O1 due to #24202.

Fixes: #24323
(cherry picked from commit 7aa4762ce274a1c9a59902b972fa4fdee1b22715)
(cherry picked from commit 23d66a03dec8640e8f8603686c6d0a739084a823)
This commit is contained in:
Jan Janssen 2022-10-09 17:16:12 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 1a09fb995e
commit ec35091c8a

View File

@ -203,7 +203,7 @@ endif
if get_option('debug') and get_option('mode') == 'developer'
efi_cflags += ['-ggdb', '-DEFI_DEBUG']
endif
if get_option('optimization') != '0'
if get_option('optimization') in ['1', '2', '3', 's', 'g']
efi_cflags += ['-O' + get_option('optimization')]
endif
if get_option('b_ndebug') == 'true' or (