setup.py: always use -fno-strict-aliasing
pypy3 also doesn't set it by default, might as well force it always now that we can check if the compiler supports it.
This commit is contained in:
parent
e9cc184bb3
commit
b893898c8d
|
@ -34,7 +34,7 @@ matrix:
|
|||
dist: trusty
|
||||
language: python
|
||||
python: "pypy3.5-5.10.1"
|
||||
env: CFLAGS="-coverage"
|
||||
env: CFLAGS="-Werror -coverage"
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
language: generic
|
||||
|
|
8
setup.py
8
setup.py
|
@ -155,6 +155,10 @@ def add_ext_warn_flags(ext, compiler):
|
|||
"-Wno-unused-command-line-argument",
|
||||
]
|
||||
|
||||
args += [
|
||||
"-fno-strict-aliasing",
|
||||
]
|
||||
|
||||
ext.extra_compile_args += filter_compiler_arguments(compiler, args)
|
||||
|
||||
|
||||
|
@ -386,10 +390,6 @@ class build_ext(du_build_ext):
|
|||
ext.include_dirs += pkg_config_parse('--cflags-only-I', 'cairo')
|
||||
ext.library_dirs += pkg_config_parse('--libs-only-L', 'cairo')
|
||||
ext.libraries += pkg_config_parse('--libs-only-l', 'cairo')
|
||||
if sys.version_info[0] == 2:
|
||||
# Some python setups don't pass -fno-strict-aliasing,
|
||||
# while MACROS like Py_RETURN_TRUE require it.
|
||||
ext.extra_compile_args += ["-fno-strict-aliasing"]
|
||||
|
||||
compiler = new_compiler(compiler=self.compiler)
|
||||
customize_compiler(compiler)
|
||||
|
|
Loading…
Reference in New Issue