mirror of https://github.com/ArduPilot/ardupilot
waf: add option to override toolchain
This commit is contained in:
parent
b2523021fb
commit
03ed67a996
|
@ -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')
|
||||
|
|
|
@ -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):
|
|||
|
||||
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
5
wscript
|
@ -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…
Reference in New Issue