BLD: use -ftrapping-math with Clang on macOS in Meson build#24060
Merged
seberg merged 1 commit intonumpy:mainfrom Jun 27, 2023
Merged
BLD: use -ftrapping-math with Clang on macOS in Meson build#24060seberg merged 1 commit intonumpy:mainfrom
-ftrapping-math with Clang on macOS in Meson build#24060seberg merged 1 commit intonumpy:mainfrom
Conversation
The 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.
Member
|
Do builds on cirrus, github, conda-forge all use XCode 14.3+? |
Member
Author
No, but they don't need to, this still works - it's just a build warning. We can suppress them with |
seberg
approved these changes
Jun 27, 2023
Member
seberg
left a comment
There was a problem hiding this comment.
Looks like this adopts the status-quo to meson. It would be nice to hide the warnings, but I don't think we should worry about it.
It's great that the new XCode should finally fix the missing option, hopefully we can remove quite a few hacks eventually...
-ftrapping-math with Clang on macOS in Meson build-ftrapping-math with Clang on macOS in Meson build
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The distutils build also uses this flag, and it avoids some problems with
floor_divideand similar functions (xref gh-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:
Since they're a little annoying to suppress (at least without completely disabling those warnings, which doesn't seem desirable) and will go away when updating to the latest XCode version, we'll ignore these warnings.