build: add some fortification flags

This commit is contained in:
Dirk-Jan C. Binnema 2023-12-01 19:12:15 +02:00
parent 149ec143ba
commit 8e52ef6a7c
1 changed files with 3 additions and 1 deletions

View File

@ -58,10 +58,11 @@ extra_flags = [
'-Wformat-security',
'-Wformat=2',
'-Wstack-protector',
'-fstack-protector-strong',
'-Wno-switch-enum',
# assuming these are false alarm... (in fmt, with gcc13):
'-Wno-array-bounds',
'-Wno-stringop-overflow']
'-Wno-stringop-overflow',]
if (cxx.get_id() == 'clang')
extra_flags += [
@ -77,6 +78,7 @@ extra_cpp_flags= [
if get_option('buildtype') == 'debug'
extra_flags += [
'-D_GLIBCXX_ASSERTIONS',
'-ggdb',
'-g3']
endif