-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Description
The cibuildwheel config contains CFLAGS="-fno-strict-aliasing"
here, specifically for building wheels on Linux and macOS. I've looked in the history of that, but couldn't really determine why this was added in this way. It doesn't make too much sense that we'd need it for our own wheel builds, but that users who build from source on the same platforms would not need it. So my guess is that it was added there to fix some particular problem and it was hard to add compiler flags with numpy.distutils
in a more generic way, so we left it at patching up an issue found when testing wheels.
Does anyone remember?
I'd expect that if we need this flag, we need it for C++ too and not only for C. And that we should add it in the build system for compilers that support the flag, rather than only for wheels.