diff --git a/Tools/ardupilotwaf/toolchain.py b/Tools/ardupilotwaf/toolchain.py index ba0a9991f7..a4e5ed0e1d 100644 --- a/Tools/ardupilotwaf/toolchain.py +++ b/Tools/ardupilotwaf/toolchain.py @@ -131,13 +131,20 @@ def configure(cfg): _filter_supported_cxx_compilers('g++', 'clang++') if cfg.env.TOOLCHAIN == 'native': - cfg.load('compiler_cxx compiler_c gccdeps') + cfg.load('compiler_cxx compiler_c') + + if not cfg.options.disable_gccdeps: + cfg.load('gccdeps') + return cfg.find_toolchain_program('ar') cfg.msg('Using toolchain', cfg.env.TOOLCHAIN) - cfg.load('compiler_cxx compiler_c gccdeps') + cfg.load('compiler_cxx compiler_c') + + if not cfg.options.disable_gccdeps: + cfg.load('gccdeps') if cfg.env.COMPILER_CC == 'clang': cfg.env.CFLAGS += cfg.env.CLANG_FLAGS diff --git a/wscript b/wscript index 94480c935f..d6dd42fb86 100644 --- a/wscript +++ b/wscript @@ -67,6 +67,11 @@ def options(opt): default=False, help='Configure as debug variant.') + g.add_option('--disable-gccdeps', + action='store_true', + default=False, + help='Disable the use of GCC dependencies output method and use waf default method.') + g.add_option('--enable-asserts', action='store_true', default=False,