Use optimization and debug flags based on build type.

This commit is contained in:
Jussi Pakkanen 2013-02-10 21:04:30 +02:00
parent 25984b8e65
commit 399c2104fe
1 changed files with 4 additions and 1 deletions

View File

@ -122,7 +122,10 @@ class Generator():
commands = []
commands += self.build.get_global_flags(compiler)
commands += target.get_extra_args(compiler.get_language())
commands += compiler.get_debug_flags()
if self.environment.options.buildtype != 'plain':
commands += compiler.get_debug_flags()
if self.environment.options.buildtype == 'optimized':
commands += compiler.get_std_opt_flags()
commands += compiler.get_std_warn_flags()
if isinstance(target, interpreter.SharedLibrary):
commands += compiler.get_pic_flags()