BLD: Add clang `-ftrapping-math` also for `compiler_so` by seberg · Pull Request #19479 · numpy/numpy
seberg
changed the title
BLD: Add clang
BLD: Add clang -ffp-exception-behavior=strict also for _so-ftrapping-math 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. The old try was `-ffp-exception-behavior=strict`, but that seems to be a fairly new addition (and doesn't even work on MacOS with 10.0) `-ftrapping-math` seems to be the older, equivalent option.
seberg
changed the title
BLD: Add clang
BLD: Add clang -ftrapping-math also for _so-ftrapping-math also for compiler_so
seberg
deleted the
fixup-clang-flag-try
branch
This was referenced
Feb 9, 2022rgommers added a commit to rgommers/numpy that referenced this pull request
Jun 27, 2023The distutils build also uses this flag, and it avoids some problems with `floor_divide` and similar functions (xref numpygh-19479).
rgommers added a commit to rgommers/numpy that referenced this pull request
Jun 27, 2023The distutils build also uses this flag, and it avoids some problems with `floor_divide` and similar functions (xref numpygh-19479). For older macOS arm64 Clang versions, the flag does get accepted, but then gets overridden because it's not actually supported - which yields these warnings: ``` warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] ``` Since they're a little annoying to suppress and will go away when updating to the latest XCode version, we'll ignore these warnings.
charris pushed a commit to charris/numpy that referenced this pull request
Jul 14, 2023The distutils build also uses this flag, and it avoids some problems with `floor_divide` and similar functions (xref numpygh-19479). For older macOS arm64 Clang versions, the flag does get accepted, but then gets overridden because it's not actually supported - which yields these warnings: ``` warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] ``` Since they're a little annoying to suppress and will go away when updating to the latest XCode version, we'll ignore these warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters