1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00

meson: Compile with -ftrivial-auto-var-init=zero in release mode

This commit is contained in:
Jan Janssen 2022-05-07 11:31:26 +02:00
parent 7eeedcfcb1
commit 1a4e392760

View File

@ -413,6 +413,13 @@ if cc.get_id() == 'clang'
]
endif
if get_option('mode') == 'release'
# We could enable 'pattern' for developer mode, but that can interfere with
# valgrind and sanitizer builds. Also, clang does not zero-initialize unions,
# breaking some of our code (https://reviews.llvm.org/D68115).
possible_common_cc_flags += '-ftrivial-auto-var-init=zero'
endif
possible_cc_flags = possible_common_cc_flags + [
'-Werror=missing-declarations',
'-Werror=missing-prototypes',