From 389a9ee88bed1e68825e6ea567866fd981faaad1 Mon Sep 17 00:00:00 2001 From: Francisco Ferreira Date: Sun, 2 Sep 2018 15:30:47 +0100 Subject: [PATCH] waf: add option to disable gccdeps --- Tools/ardupilotwaf/toolchain.py | 11 +++++++++-- wscript | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) 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,