Bug 1265627 - Check that using the compiler flags we add does what they are intended to do. r?ted
While this is not immediately useful, it will be with the next changes.
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -455,20 +455,32 @@ def compiler(language, host_or_target, c
full_path):
die('Found `%s` before `%s` in your $PATH. '
'Please reorder your $PATH.',
quote(os.path.dirname(found_compiler)),
quote(os.path.dirname(full_path)))
type, version, more_flags = check_compiler(
wrapper + [compiler] + flags, language)
+
+ # Check that the additional flags we got are enough to not require any
+ # more flags.
+ if more_flags:
+ flags += more_flags
+ type, version, more_flags = check_compiler(
+ wrapper + [compiler] + flags, language)
+
+ if more_flags:
+ raise FatalCheckError(
+ 'Unknown compiler or compiler not supported.')
+
return namespace(
wrapper=wrapper,
compiler=compiler,
- flags=flags + more_flags,
+ flags=flags,
type=type,
version=version,
)
@depends(valid_compiler)
@checking('%s version' % what)
def compiler_version(compiler):
return compiler.version