From 55e91f0325534da0ca277a034d201a423c6d7cca Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2016 12:26:24 +1000 Subject: [PATCH] waf: added --static option this forces a static build --- wscript | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wscript b/wscript index dac4d3fd81..c600c25c7b 100644 --- a/wscript +++ b/wscript @@ -90,6 +90,11 @@ revisions. default=False, help="Don't use libiio even if supported by board and dependencies available") + g.add_option('--static', + action='store_true', + default=False, + help='Force a static build') + def _collect_autoconfig_files(cfg): for m in sys.modules.values(): paths = [] @@ -122,6 +127,10 @@ def configure(cfg): # Allow to differentiate our build from the make build cfg.define('WAF_BUILD', 1) + if cfg.options.static: + cfg.msg('Using static linking') + env.STATIC_LINKING = True + cfg.msg('Setting board to', cfg.options.board) cfg.get_board().configure(cfg)