Skip to content

BLD: add warn-error option, adds -Werror to compiler #14527

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
Sep 20, 2019

Conversation

mattip
Copy link
Member

@mattip mattip commented Sep 16, 2019

Adds the -Werror compiler option to build, build_clib and build_ext sub-commands. Can be used with CC=clang to try out the clang compiler and see the errors

@mattip
Copy link
Member Author

mattip commented Sep 16, 2019

This relates to build enhancements in #14518 which hides the compiler output from build_src.

@@ -106,6 +106,8 @@ def main(argv):
help="Debug build")
parser.add_argument("--parallel", "-j", type=int, default=0,
help="Number of parallel jobs during build")
parser.add_argument("--warn-error", action="store_true",
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about making this true by default, that will be very annoying since the build isn't clean right now in many cases. And you can't expect everyone to go fix these.

Copy link
Member Author

Choose a reason for hiding this comment

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

store_true means the default value is False, and when they add the --warn-error flag the value changes to True

Copy link
Member

Choose a reason for hiding this comment

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

ah yes, never mind. been confused by that one before

@mattip
Copy link
Member Author

mattip commented Sep 20, 2019

The CI fail is not related, should I rebase to clear it?

@mattip mattip force-pushed the c-warnings-as-error branch from 842175c to 05bed28 Compare September 20, 2019 15:09
@rgommers rgommers changed the title WIP/BUILD: add warn-error option, adds -Werror to compiler BLD: add warn-error option, adds -Werror to compiler Sep 20, 2019
@rgommers rgommers merged commit aa5be97 into numpy:master Sep 20, 2019
@rgommers
Copy link
Member

LGTM, merged. Thanks @mattip

@mattip mattip deleted the c-warnings-as-error branch June 8, 2020 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants