diff --git a/Tools/ardupilotwaf/ap_library.py b/Tools/ardupilotwaf/ap_library.py index 303e9a28ce7c5..cbe1d43a14640 100644 --- a/Tools/ardupilotwaf/ap_library.py +++ b/Tools/ardupilotwaf/ap_library.py @@ -199,9 +199,7 @@ def signature(self): bld = self.generator.bld # force scan() to be called bld.imp_sigs[self.uid()] = None - s = super(ap_library_check_headers, self).signature() - bld.ap_persistent_task_sigs[self.uid()] = s - return s + return super(ap_library_check_headers, self).signature() def scan(self): r = [] diff --git a/Tools/ardupilotwaf/ap_persistent.py b/Tools/ardupilotwaf/ap_persistent.py deleted file mode 100644 index 1c7b0e9064560..0000000000000 --- a/Tools/ardupilotwaf/ap_persistent.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2016 Intel Corporation. All rights reserved. -# -# This file is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . - -# flake8: noqa - -""" -Module that changes Waf to keep persistent information across clean operations -in for performance improvement. -""" -from waflib import Build, Task - -Build.SAVED_ATTRS.append('ap_persistent_task_sigs') -Build.SAVED_ATTRS.append('ap_persistent_imp_sigs') -Build.SAVED_ATTRS.append('ap_persistent_node_deps') - -_original_signature = Task.Task.signature - -_original_sig_implicit_deps = Task.Task.sig_implicit_deps -if hasattr(_original_sig_implicit_deps, '__func__'): - _original_sig_implicit_deps = _original_sig_implicit_deps.__func__ - -def _signature(self): - s = _original_signature(self) - real_fn = self.sig_implicit_deps.__func__ - if not self.scan or _original_sig_implicit_deps != real_fn: - return s - bld = self.generator.bld - bld.ap_persistent_imp_sigs[self.uid()] = bld.imp_sigs[self.uid()] - bld.ap_persistent_node_deps[self.uid()] = bld.node_deps[self.uid()] - return s -Task.Task.signature = _signature - -class CleanContext(Build.CleanContext): - def clean(self): - if not self.options.clean_all_sigs: - saved_task_sigs = dict(self.ap_persistent_task_sigs) - saved_imp_sigs = dict(self.ap_persistent_imp_sigs) - saved_node_deps = dict(self.ap_persistent_node_deps) - - super(CleanContext, self).clean() - - if not self.options.clean_all_sigs: - self.task_sigs.update(saved_task_sigs) - self.ap_persistent_task_sigs.update(saved_task_sigs) - - self.imp_sigs.update(saved_imp_sigs) - self.ap_persistent_imp_sigs.update(saved_imp_sigs) - - self.node_deps.update(saved_node_deps) - self.ap_persistent_node_deps.update(saved_node_deps) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index 0e1b4896c7dfb..d175593ff48f2 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -11,8 +11,6 @@ from collections import OrderedDict import subprocess -import ap_persistent - SOURCE_EXTS = [ '*.S', '*.c', @@ -709,16 +707,6 @@ def options(opt): g = opt.ap_groups['clean'] - g.add_option('--clean-all-sigs', - action='store_true', - help='''Clean signatures for all tasks. By default, tasks that scan for -implicit dependencies (like the compilation tasks) keep the dependency -information across clean commands, so that that information is changed -only when really necessary. Also, some tasks that don't really produce -files persist their signature. This option avoids that behavior when -cleaning the build. -''') - g.add_option('--asan', action='store_true', help='''Build using the macOS clang Address Sanitizer. In order to run with diff --git a/Tools/ardupilotwaf/toolchain.py b/Tools/ardupilotwaf/toolchain.py index 364ac93a7370f..ca94197a22b00 100644 --- a/Tools/ardupilotwaf/toolchain.py +++ b/Tools/ardupilotwaf/toolchain.py @@ -139,10 +139,7 @@ def configure(cfg): return if cfg.env.TOOLCHAIN == 'native': - cfg.load('compiler_cxx compiler_c') - - if not cfg.options.disable_gccdeps: - cfg.load('gccdeps') + cfg.load('compiler_cxx compiler_c gccdeps') return @@ -152,16 +149,13 @@ def configure(cfg): cfg.find_program('ar', var='AR', quiet=True) else: cfg.find_program('%s-ar' % cfg.env.TOOLCHAIN, var='AR', quiet=True) - cfg.load('compiler_cxx compiler_c') + cfg.load('compiler_cxx compiler_c gccdeps') if sys.platform.startswith("cygwin"): cfg.find_program('nm', var='NM') else: cfg.find_program('%s-nm' % cfg.env.TOOLCHAIN, var='NM') - if not cfg.options.disable_gccdeps: - cfg.load('gccdeps') - if cfg.env.COMPILER_CC == 'clang': cfg.env.CFLAGS += cfg.env.CLANG_FLAGS cfg.env.LINKFLAGS_cprogram += cfg.env.CLANG_FLAGS diff --git a/wscript b/wscript index de224260c44d0..e066c722efb24 100644 --- a/wscript +++ b/wscript @@ -194,11 +194,6 @@ def options(opt): 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, - help='Disable the use of GCC dependencies output method and use waf default method.') - g.add_option('--enable-asserts', action='store_true', default=False,