diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-10-07 11:46:23 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-10-28 17:07:02 -0700 |
commit | d8814ed59e7a93c1cbcaea1d92d0c7eea53f19c9 (patch) | |
tree | bf63a0af552e60fe606b0222762a5d4bf87153ba /python | |
parent | 30cbd4c5610ab2a500d18223b5c2dd6e9caacc17 (diff) | |
download | protobuf-d8814ed59e7a93c1cbcaea1d92d0c7eea53f19c9.tar.gz protobuf-d8814ed59e7a93c1cbcaea1d92d0c7eea53f19c9.tar.bz2 protobuf-d8814ed59e7a93c1cbcaea1d92d0c7eea53f19c9.zip |
Special-case Clang-only warning flags to Clang.
Diffstat (limited to 'python')
-rwxr-xr-x | python/setup.py | 6 | ||||
-rw-r--r-- | python/tox.ini | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python/setup.py b/python/setup.py index 1ff5b9dd..9a7eaddf 100755 --- a/python/setup.py +++ b/python/setup.py @@ -151,8 +151,10 @@ if __name__ == '__main__': warnings_as_errors = '--warnings_as_errors' if cpp_impl in sys.argv: sys.argv.remove(cpp_impl) - extra_compile_args = ['-Wno-write-strings', '-Wno-shorten-64-to-32', - '-Wno-invalid-offsetof'] + extra_compile_args = ['-Wno-write-strings', '-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: extra_compile_args.append('-Werror') diff --git a/python/tox.ini b/python/tox.ini index 7deb3ba3..74b2ac05 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -1,7 +1,5 @@ [tox] 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} [testenv] |