From 7eae81eb96b141804e845187cfb54edfe7bfca04 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Wed, 14 Jul 2021 16:53:34 -0500 Subject: [PATCH] BLD: Add clang `-ffp-exception-behavior=strict` also for `_so` Apparently, there is a second `compiler_so` that is actually the main compiler being used, and modifying only the first one is just futile. --- numpy/distutils/ccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index 061f4862dc1..38fe12d328f 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -389,6 +389,7 @@ def CCompiler_customize_cmd(self, cmd, ignore=()): # clang defaults to a non-strict floating error point model. # Since NumPy and most Python libs give warnings for these, override: self.compiler.append('-ffp-exception-behavior=strict') + self.compiler_so.append('-ffp-exception-behavior=strict') def allow(attr): return getattr(cmd, attr, None) is not None and attr not in ignore