From 12946db4dc320b5378b7c200fbec1055b45fdb2f Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Wed, 2 Mar 2016 18:20:45 -0300 Subject: [PATCH] waf: ardupilotwaf: remove common_features() The function ap_program() was the only one that was using it, so let's just inline it. Besides, the name was misleading, since the (only) feature added was for programs instead of general task generators. --- Tools/ardupilotwaf/ardupilotwaf.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index a1ca3fb8cc..4c962e3e9c 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -101,7 +101,10 @@ def ap_program(bld, program_group='bin', if use_legacy_defines: kw['defines'].extend(_get_legacy_defines(bld.path.name)) - kw['features'] = common_features(bld) + kw.get('features', []) + kw['features'] = kw.get('features', []) + + if bld.env.STATIC_LINKING: + kw['features'].append('static_linking') name = os.path.join(program_group, program_name) @@ -128,12 +131,6 @@ def _get_next_idx(): LAST_IDX += 1 return LAST_IDX -def common_features(bld): - features = [] - if bld.env.STATIC_LINKING: - features.append('static_linking') - return features - @conf def ap_stlib(bld, **kw): if 'name' not in kw: