Skip to content

ENH: Introduce numpy.core.setup_common.NPY_CXX_FLAGS #21306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

serge-sans-paille
Copy link
Contributor

Group all C++ flags in one location.

This avoids redundancy and makes sure we test the flags we use, and use the
flags we test.

Fix #21302

@serge-sans-paille serge-sans-paille force-pushed the feature/syndicate-cxxflags branch 2 times, most recently from 9fde2ec to 9e583c2 Compare April 7, 2022 07:07
@serge-sans-paille serge-sans-paille force-pushed the feature/syndicate-cxxflags branch from 9e583c2 to 0c8b62b Compare April 7, 2022 10:09
'-D__STDC_VERSION__=0', # for compatibility with C headers
'-fno-exceptions', # no exception support
'-fno-rtti'] # no runtime type information

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should document these flags in numpy/doc/source/user/building.rst as "the set of c++ features we support", xref #21299

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would make sense.

Group all C++ flags in one location.

This avoids redundancy and makes sure we test the flags we use, and use the
flags we test.

Fix numpy#21302
@serge-sans-paille serge-sans-paille force-pushed the feature/syndicate-cxxflags branch from 0c8b62b to c91a7d0 Compare April 8, 2022 08:03
@mattip mattip merged commit 65a701f into numpy:main Apr 8, 2022
@mattip
Copy link
Member

mattip commented Apr 8, 2022

Thanks @serge-sans-paille

@charris charris changed the title Introduce numpy.core.setup_common.NPY_CXX_FLAGS ENH: Introduce numpy.core.setup_common.NPY_CXX_FLAGS Apr 21, 2022
@charris charris added the C++ Related to introduction and use of C++ in the NumPy code base label Apr 21, 2022
@rgommers
Copy link
Member

rgommers commented May 4, 2022

@charris did you plan on backporting this to 1.22.4? That seems like a good idea, given that it's broken in 1.22.3

@rgommers rgommers added the 09 - Backport-Candidate PRs tagged should be backported label May 4, 2022
@charris
Copy link
Member

charris commented May 4, 2022

I will now :)

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement C++ Related to introduction and use of C++ in the NumPy code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: numpy build fails with gcc version 4.9.2
4 participants