Commit d8814ed5 authored by Josh Haberman's avatar Josh Haberman

Special-case Clang-only warning flags to Clang.

parent 30cbd4c5
...@@ -151,8 +151,10 @@ if __name__ == '__main__': ...@@ -151,8 +151,10 @@ if __name__ == '__main__':
warnings_as_errors = '--warnings_as_errors' warnings_as_errors = '--warnings_as_errors'
if cpp_impl in sys.argv: if cpp_impl in sys.argv:
sys.argv.remove(cpp_impl) sys.argv.remove(cpp_impl)
extra_compile_args = ['-Wno-write-strings', '-Wno-shorten-64-to-32', extra_compile_args = ['-Wno-write-strings', '-Wno-invalid-offsetof']
'-Wno-invalid-offsetof']
if "clang" in os.popen('$CC --version').read():
extra_compile_args.append('-Wno-shorten-64-to-32')
if warnings_as_errors in sys.argv: if warnings_as_errors in sys.argv:
extra_compile_args.append('-Werror') extra_compile_args.append('-Werror')
......
[tox] [tox]
envlist = envlist =
# cpp implementation on py34 is currently broken due to
# changes introduced by http://bugs.python.org/issue22079.
py{26,27,33,34}-{cpp,python} py{26,27,33,34}-{cpp,python}
[testenv] [testenv]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment