Browse Source

waf: add option to override toolchain

mission-4.1.18
Francisco Ferreira 6 years ago committed by Andrew Tridgell
parent
commit
03ed67a996
  1. 2
      Tools/ardupilotwaf/boards.py
  2. 4
      Tools/ardupilotwaf/toolchain.py
  3. 5
      wscript

2
Tools/ardupilotwaf/boards.py

@ -35,7 +35,7 @@ class Board: @@ -35,7 +35,7 @@ class Board:
self.with_uavcan = False
def configure(self, cfg):
cfg.env.TOOLCHAIN = self.toolchain
cfg.env.TOOLCHAIN = cfg.options.toolchain or self.toolchain
cfg.env.ROMFS_FILES = []
cfg.load('toolchain')
cfg.load('cxx_checks')

4
Tools/ardupilotwaf/toolchain.py

@ -131,6 +131,8 @@ def configure(cfg): @@ -131,6 +131,8 @@ def configure(cfg):
_filter_supported_c_compilers('gcc', 'clang')
_filter_supported_cxx_compilers('g++', 'clang++')
cfg.msg('Using toolchain', cfg.env.TOOLCHAIN)
if cfg.env.TOOLCHAIN == 'native':
cfg.load('compiler_cxx compiler_c')
@ -139,8 +141,6 @@ def configure(cfg): @@ -139,8 +141,6 @@ def configure(cfg):
return
cfg.msg('Using toolchain', cfg.env.TOOLCHAIN)
_set_pkgconfig_crosscompilation_wrapper(cfg)
cfg.find_program('%s-ar' % cfg.env.TOOLCHAIN, var='AR', quiet=True)
cfg.load('compiler_cxx compiler_c')

5
wscript

@ -75,6 +75,11 @@ def options(opt): @@ -75,6 +75,11 @@ def options(opt):
default=False,
help='Configure as debug variant.')
g.add_option('--toolchain',
action='store',
default=None,
help='Override default toolchain used for the board. Use "native" for using the host toolchain.')
g.add_option('--disable-gccdeps',
action='store_true',
default=False,

Loading…
Cancel
Save