meson: use better check for debug builds
meson 0.48 added the 'debug' and 'optimization' builtin options, which bidirectionally map to the buildtype, but in some cases where debug is enabled, the builtype may be custom. Checking the 'debug' option lets us detect every case currently detected, plus a few more, and does so in a shorter and more concise manner. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
df30f10672
commit
3a6c9220ff
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ elif conf.has('HAVE_STRUCT_STATFS_F_FLAGS')
|
||||||
conf.set('FSSTATSTYPE', 'struct statfs')
|
conf.set('FSSTATSTYPE', 'struct statfs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('buildtype').startswith('debug')
|
if get_option('debug')
|
||||||
extra_cflags = [
|
extra_cflags = [
|
||||||
'-Wcast-align',
|
'-Wcast-align',
|
||||||
'-Wclobbered',
|
'-Wclobbered',
|
||||||
|
|
Loading…
Add table
Reference in a new issue