Browse Source

waf: added --assert-cc-version configure option

this will allow build_binaries.py to confirm it is using the right
compiler for each build
gps-1.3.1
Andrew Tridgell 4 years ago
parent
commit
66bad7b885
  1. 7
      Tools/ardupilotwaf/boards.py
  2. 4
      wscript

7
Tools/ardupilotwaf/boards.py

@ -156,6 +156,13 @@ class Board: @@ -156,6 +156,13 @@ class Board:
cfg.msg("CXX Compiler", "%s %s" % (cfg.env.COMPILER_CXX, ".".join(cfg.env.CC_VERSION)))
if cfg.options.assert_cc_version:
cfg.msg("Checking compiler", "%s %s" % (cfg.options.assert_cc_version, ".".join(cfg.env.CC_VERSION)))
have_version = cfg.env.COMPILER_CXX+"-"+'.'.join(list(cfg.env.CC_VERSION))
want_version = cfg.options.assert_cc_version
if have_version != want_version:
cfg.fatal("cc version mismatch: %s should be %s" % (have_version, want_version))
if 'clang' in cfg.env.COMPILER_CC:
env.CFLAGS += [
'-fcolor-diagnostics',

4
wscript

@ -286,6 +286,10 @@ configuration in order to save typing. @@ -286,6 +286,10 @@ configuration in order to save typing.
default=None,
help='Extra hwdef.dat file for custom build.')
g.add_option('--assert-cc-version',
default=None,
help='fail configure if not using the specified gcc version')
def _collect_autoconfig_files(cfg):
for m in sys.modules.values():
paths = []

Loading…
Cancel
Save