diff options
| author | Andrew Nelson <andyfaff@gmail.com> | 2023-04-08 11:13:23 +1000 |
|---|---|---|
| committer | Andrew Nelson <andyfaff@gmail.com> | 2023-04-08 11:13:23 +1000 |
| commit | 8a32e35327acf2c2ca377658b6528a474565b2f3 (patch) | |
| tree | 3cddcf31f4699b3bfc65198fd4493272e449775f /numpy | |
| parent | c9229a3069cb698b0cbae5f7267566a8cb5d11d9 (diff) | |
| download | numpy-8a32e35327acf2c2ca377658b6528a474565b2f3.tar.gz | |
BLD: remove -ftrapping-math on macosx_arm64
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/distutils/ccompiler.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index 0e018a268..0a9317a3d 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -1,6 +1,7 @@ import os import re import sys +import platform import shlex import time import subprocess @@ -394,8 +395,14 @@ def CCompiler_customize_cmd(self, cmd, ignore=()): log.info('customize %s using %s' % (self.__class__.__name__, cmd.__class__.__name__)) - if hasattr(self, 'compiler') and 'clang' in self.compiler[0]: + if ( + hasattr(self, 'compiler') and + 'clang' in self.compiler[0] and + not (platform.machine() == 'arm64' and sys.platform == 'darwin') + ): # clang defaults to a non-strict floating error point model. + # However, '-ftrapping-math' is not currently supported (2022-04-08) + # for macosx_arm64. # Since NumPy and most Python libs give warnings for these, override: self.compiler.append('-ftrapping-math') self.compiler_so.append('-ftrapping-math') |
