Disable assertion checks with 'none' debug level
If CCFLAGS are defined, it takes precedence over 'none'.
This commit is contained in:
parent
e4eeb1fdc0
commit
6767225b2a
1 changed files with 11 additions and 10 deletions
19
wscript
19
wscript
|
@ -282,13 +282,18 @@ def configure (conf):
|
||||||
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
||||||
debug_level = Options.options.debug_level
|
debug_level = Options.options.debug_level
|
||||||
compiler = conf.env['CC_NAME']
|
compiler = conf.env['CC_NAME']
|
||||||
if debug_level == '':
|
if debug_level != '' and compiler != 'gcc':
|
||||||
if compiler == 'gcc':
|
Utils.pprint ('RED', 'No debugging level support for ' + compiler)
|
||||||
|
sys.exit (1)
|
||||||
|
elif debug_level == '':
|
||||||
debug_level = 'debug'
|
debug_level = 'debug'
|
||||||
else:
|
|
||||||
debug_level = 'none'
|
|
||||||
if compiler == 'gcc':
|
if compiler == 'gcc':
|
||||||
if debug_level == 'debug':
|
if debug_level == 'none':
|
||||||
|
if 'CCFLAGS' in os.environ:
|
||||||
|
conf.env.append_value ('CCFLAGS', os.environ['CCFLAGS'].split ())
|
||||||
|
else:
|
||||||
|
conf.env.append_value ('CCFLAGS', '-DG_DISABLE_CHECKS')
|
||||||
|
elif debug_level == 'debug':
|
||||||
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g'.split ())
|
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g'.split ())
|
||||||
elif debug_level == 'full':
|
elif debug_level == 'full':
|
||||||
# -Wdeclaration-after-statement
|
# -Wdeclaration-after-statement
|
||||||
|
@ -308,10 +313,6 @@ def configure (conf):
|
||||||
'-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED '
|
'-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED '
|
||||||
'-DGTK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED '
|
'-DGTK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED '
|
||||||
'-DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE'.split ())
|
'-DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE'.split ())
|
||||||
elif debug_level != 'none':
|
|
||||||
Utils.pprint ('RED', 'No debugging level support for ' + compiler)
|
|
||||||
sys.exit (1)
|
|
||||||
|
|
||||||
print '''
|
print '''
|
||||||
Localization: %(nls)s (intltool)
|
Localization: %(nls)s (intltool)
|
||||||
Icon optimizations: %(icons)s (rsvg-convert)
|
Icon optimizations: %(icons)s (rsvg-convert)
|
||||||
|
|
Loading…
Reference in a new issue