Shift selection of debug-level
Currently configure switches on gcc to debug mode what means -O0. Adding -d none does not help because it is filtered out earlier. -d bla would help if bla were an allowed keyword. This patch simply shifts the "compiler is gcc" block to the left so -O2 is selected if the user selected -d none on the command line. Other compilers remain with no extra switches.
This commit is contained in:
parent
3a36d27d6f
commit
461b831d97
1 changed files with 20 additions and 21 deletions
41
wscript
41
wscript
|
@ -181,28 +181,27 @@ def configure (conf):
|
||||||
debug_level = 'debug'
|
debug_level = 'debug'
|
||||||
else:
|
else:
|
||||||
debug_level = 'none'
|
debug_level = 'none'
|
||||||
if debug_level != 'none':
|
if compiler == 'gcc':
|
||||||
if compiler == 'gcc':
|
if debug_level == 'debug':
|
||||||
if 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
|
# -Wmissing-declarations -Wmissing-prototypes
|
||||||
# -Wmissing-declarations -Wmissing-prototypes
|
# -Wwrite-strings
|
||||||
# -Wwrite-strings
|
conf.env.append_value ('CCFLAGS',
|
||||||
conf.env.append_value ('CCFLAGS',
|
'-Wall -Wextra -O1 -g '
|
||||||
'-Wall -Wextra -O1 -g '
|
'-Waggregate-return -Wno-unused-parameter '
|
||||||
'-Waggregate-return -Wno-unused-parameter '
|
'-Wno-missing-field-initializers '
|
||||||
'-Wno-missing-field-initializers '
|
'-Wunsafe-loop-optimizations '
|
||||||
'-Wunsafe-loop-optimizations '
|
'-Wredundant-decls -Wmissing-noreturn '
|
||||||
'-Wredundant-decls -Wmissing-noreturn '
|
'-Wshadow -Wpointer-arith -Wcast-align '
|
||||||
'-Wshadow -Wpointer-arith -Wcast-align '
|
'-Winline -Wformat-security '
|
||||||
'-Winline -Wformat-security '
|
'-Winit-self -Wmissing-include-dirs -Wundef '
|
||||||
'-Winit-self -Wmissing-include-dirs -Wundef '
|
'-Wmissing-format-attribute -Wnested-externs '
|
||||||
'-Wmissing-format-attribute -Wnested-externs '
|
'-DG_ENABLE_DEBUG'.split ())
|
||||||
'-DG_ENABLE_DEBUG'.split ())
|
|
||||||
else:
|
|
||||||
conf.env.append_value ('CCFLAGS', '-O2')
|
|
||||||
else:
|
else:
|
||||||
|
conf.env.append_value ('CCFLAGS', '-O2')
|
||||||
|
elif debug_level != 'none':
|
||||||
Utils.pprint ('RED', 'No debugging level support for ' + compiler)
|
Utils.pprint ('RED', 'No debugging level support for ' + compiler)
|
||||||
sys.exit (1)
|
sys.exit (1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue