meson: Set _FORTIFY_SOURCE=2 for optimized builds
This commit is contained in:
parent
85860e4e7c
commit
554898e6b3
1 changed files with 5 additions and 1 deletions
|
@ -23,13 +23,17 @@ add_project_arguments(
|
||||||
'-Wmissing-prototypes',
|
'-Wmissing-prototypes',
|
||||||
'-Wno-unknown-warning',
|
'-Wno-unknown-warning',
|
||||||
'-Wvla',
|
'-Wvla',
|
||||||
'-D_XOPEN_SOURCE=9000',
|
|
||||||
'-Wl,--exclude-libs=ALL',
|
'-Wl,--exclude-libs=ALL',
|
||||||
'-fvisibility=hidden',
|
'-fvisibility=hidden',
|
||||||
|
'-D_XOPEN_SOURCE=700',
|
||||||
],
|
],
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ['debugoptimized', 'release', 'minsize'].contains(get_option('buildtype'))
|
||||||
|
add_project_arguments('-D_FORTIFY_SOURCE=2', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
# Hacks
|
# Hacks
|
||||||
source_root = meson.current_source_dir().split('/')
|
source_root = meson.current_source_dir().split('/')
|
||||||
build_root = meson.build_root().split('/')
|
build_root = meson.build_root().split('/')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue