From 85681a380776e62a140eb127a5dcd11de8d45af8 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 30 Sep 2013 17:45:39 -0700 Subject: only pass these on OS X --- cryptography/bindings/openssl/api.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 49edc92e..6de5445d 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -39,18 +39,21 @@ class API(object): self.ffi.cdef(module.FUNCTIONS) includes.append(module.INCLUDES) + extra_compile_args = [ + # Be very loud about everything else + "-Wall", "-Werror", "-Wpedantic", "-Wconversion" + ] + if sys.platform == "darwin": + # All of OpenSSL is deprecated on OS X, so we ignore this. + extra_compile_args.append("-Wno-deprecated") + # Disabled because on stock OS X there is an "-mno-fused-madd" + # which is ignored. + extra_compile_args.append("-Qunused-arguments") + self.lib = self.ffi.verify( source="\n".join(includes), libraries=["crypto"], - extra_compile_args=[ - # Disabled because on stock OS X there is an "-mno-fused-madd" - # which is ignored. - "-Qunused-arguments", - # All of OpenSSL is deprecated on OS X, so we ignore this. - "-Wno-deprecated", - # Be very loud about everything else - "-Wall", "-Werror", "-Wpedantic", "-Wconversion" - ] + extra_compile_args=extra_compile_args, ) self.lib.OpenSSL_add_all_algorithms() -- cgit v1.2.3