1. Python CFFI
  2. Untitled project
  3. cffi


Armin Rigo  committed 2af1ce3

issue #46: don't pass -Werror on recent Macs

  • Participants
  • Parent commits 85ca8a6
  • Branches default

Comments (0)

Files changed (1)

File testing/test_verify.py

View file
 import py
-import sys, math, weakref
+import sys, os, math, weakref
 from cffi import FFI, VerificationError, VerificationMissing, model
 from testing.support import *
-if sys.platform != 'win32':
+if sys.platform == 'win32':
+    pass      # no obvious -Werror equivalent on MSVC
+elif (sys.platform == 'darwin' and
+      map(int, os.uname()[2].split('.')) >= [11, 0, 0]):
+    pass      # recent MacOSX come with clang by default, and passing some
+              # flags from the interpreter (-mno-fused-madd) generates a
+              # warning --- which is interpreted as an error with -Werror
+    # assume a standard GCC
     class FFI(FFI):
         def verify(self, *args, **kwds):
-            # XXX a GCC-only way to say "crash upon warnings too"
             return super(FFI, self).verify(
                 *args, extra_compile_args=['-Werror'], **kwds)