From d18c6435c4410c3109a4d8acc6e4b48925417d90 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Mon, 2 Oct 2017 09:57:04 +0200 Subject: 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. --- wscript | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 7088eab3..d3ce7e29 100644 --- a/wscript +++ b/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) -- cgit v1.2.3