build: invert default for header checks

In the end the build time is always almost the same, but it's a pain to
change one header and have it check the world. CI continues to use the
check so we can get any mistake before merging.
This commit is contained in:
Lucas De Marchi 2018-03-27 21:04:48 -07:00
parent 7c068ee8ef
commit 997d9f58de
3 changed files with 12 additions and 8 deletions

View File

@ -199,7 +199,7 @@ def ap_library_register_for_check(self):
if not hasattr(self, 'compiled_tasks'): if not hasattr(self, 'compiled_tasks'):
return return
if self.env.DISABLE_HEADER_CHECKS: if not self.env.ENABLE_HEADER_CHECKS:
return return
for t in self.compiled_tasks: for t in self.compiled_tasks:

View File

@ -113,7 +113,11 @@ for t in $CI_BUILD_TARGET; do
if [[ -n ${waf_supported_boards[$t]} && -z ${CI_CRON_JOB+1} ]]; then if [[ -n ${waf_supported_boards[$t]} && -z ${CI_CRON_JOB+1} ]]; then
echo "Starting waf build for board ${t}..." echo "Starting waf build for board ${t}..."
$waf configure --board $t --enable-benchmarks --check-c-compiler="$c_compiler" --check-cxx-compiler="$cxx_compiler" $waf configure --board $t \
--enable-benchmarks \
--enable-header-checks \
--check-c-compiler="$c_compiler" \
--check-cxx-compiler="$cxx_compiler"
$waf clean $waf clean
$waf all $waf all
ccache -s && ccache -z ccache -s && ccache -z

12
wscript
View File

@ -81,9 +81,9 @@ option disables that.
submodules at specific revisions. submodules at specific revisions.
''') ''')
g.add_option('--disable-header-checks', action='store_true', g.add_option('--enable-header-checks', action='store_true',
default=False, default=False,
help="Disable checking of headers") help="Enable checking of headers")
g.add_option('--default-parameters', g.add_option('--default-parameters',
default=None, default=None,
@ -218,11 +218,11 @@ def configure(cfg):
cfg.msg('Setting rsync destination to', cfg.options.rsync_dest) cfg.msg('Setting rsync destination to', cfg.options.rsync_dest)
cfg.env.RSYNC_DEST = cfg.options.rsync_dest cfg.env.RSYNC_DEST = cfg.options.rsync_dest
if cfg.options.disable_header_checks: if cfg.options.enable_header_checks:
cfg.msg('Disabling header checks', cfg.options.disable_header_checks) cfg.msg('Enabling header checks', cfg.options.enable_header_checks)
cfg.env.DISABLE_HEADER_CHECKS = True cfg.env.ENABLE_HEADER_CHECKS = True
else: else:
cfg.env.DISABLE_HEADER_CHECKS = False cfg.env.ENABLE_HEADER_CHECKS = False
# TODO: Investigate if code could be changed to not depend on the # TODO: Investigate if code could be changed to not depend on the
# source absolute path. # source absolute path.