mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-16 01:42:56 +08:00
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:

committed by
Sebastian Huber

parent
a70edfc49a
commit
d18c6435c4
6
wscript
6
wscript
@@ -68,6 +68,11 @@ def options(opt):
|
||||
default = "",
|
||||
dest = "freebsd_options",
|
||||
help = "Set FreeBSD options (developer option).")
|
||||
opt.add_option("--optimization",
|
||||
action = "store",
|
||||
default = "2",
|
||||
dest = "optimization",
|
||||
help = "Set optimization level to OPTIMIZATION (-On compiler flag). Default is 2 (-O2).")
|
||||
libbsd_waf.options(opt)
|
||||
|
||||
def bsp_configure(conf, arch_bsp):
|
||||
@@ -88,6 +93,7 @@ def configure(conf):
|
||||
conf.env.WARNINGS = conf.options.warnings
|
||||
conf.env.NET_CONFIG = conf.options.net_config
|
||||
conf.env.FREEBSD_OPTIONS =conf.options.freebsd_options
|
||||
conf.env.OPTIMIZATION = conf.options.optimization
|
||||
rtems.configure(conf, bsp_configure)
|
||||
libbsd_waf.configure(conf)
|
||||
|
||||
|
Reference in New Issue
Block a user