From 841771096de7f0fc7de9303f14139a4c5edec2ee Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Fri, 26 Feb 2016 20:13:38 +0000 Subject: [PATCH] waf: let toolchain loading in charge of the Board class That allows boards (i.e. subclasses of Board) to use toolchain related information for configuration. The upcoming PX4 build is an example. --- Tools/ardupilotwaf/boards.py | 3 +++ wscript | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index d5795f34f2..2310abfbe9 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -46,6 +46,9 @@ class Board: else: cfg.env[k] = val + cfg.load('toolchain') + cfg.load('compiler_cxx compiler_c') + def configure_env(self, cfg, env): # Use a dictionary instead of the convetional list for definitions to # make easy to override them. Convert back to list before consumption. diff --git a/wscript b/wscript index 5a28d0abf5..934cdaad4c 100644 --- a/wscript +++ b/wscript @@ -78,8 +78,6 @@ def configure(cfg): cfg.env.BOARD = cfg.options.board boards.get_board(cfg.env.BOARD).configure(cfg) - cfg.load('toolchain') - cfg.load('compiler_cxx compiler_c') cfg.load('clang_compilation_database') cfg.load('waf_unit_test') cfg.load('mavgen')