Allow to set optimization level during configure.

This allows to set the optimization level for libbsd via a configure
switch. Useful for building with for example no optimization during
debug or with size optimization for space restricted targets.
This commit is contained in:
Christian Mauderer
2017-10-02 09:57:04 +02:00
committed by Sebastian Huber
parent a70edfc49a
commit d18c6435c4
4 changed files with 9 additions and 3 deletions

View File

@@ -371,6 +371,7 @@ class ModuleManager(builder.ModuleManager):
self.add('def build(bld):')
self.add(' # C/C++ flags')
self.add(' common_flags = []')
self.add(' common_flags += ["-O%s" % (bld.env.OPTIMIZATION)]')
for f in builder.commonFlags():
self.add(' common_flags += ["%s"]' % (f))
self.add(' if bld.env.WARNINGS:')