waf: add option to disable gccdeps

This commit is contained in:
Francisco Ferreira 2018-09-02 15:30:47 +01:00 committed by Andrew Tridgell
parent 9bdbd37d98
commit 389a9ee88b
2 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -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,