-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[cmake] Unconditionally use -Wno-pass-failed with Clang #162835
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
Conversation
Let's just do that instead. It looks like |
That sounds good to me as well - I'll update this PR with that change instead. |
Since 4feae05, most of the handling of warning options was rewritten to add such options based on hardcoded knowledge about what compilers support which options, and since which versions. This avoids a number of configure time checks, speeding up the cmake configuration. This avoids erroneously adding this option with GCC, which doesn't really support it. If testing for a warning option like -Wno-<foo> with GCC, GCC won't print any diagnostic at all, leading to the options being accepted incorrectly. However later, if compiling a file that actually prints another warning, GCC will also print warnings about these -Wno-<foo> options being unrecognized. This avoids extra warning spam like this, for every source file that does produce warnings with GCC: At global scope: cc1plus: note: unrecognized command-line option ‘-Wno-pass-failed’ may have been intended to silence earlier diagnostics
8c253e8
to
09db7b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/16577 Here is the relevant piece of the build log for the reference
|
Since 4feae05, most of the handling of warning options was rewritten to add such options based on hardcoded knowledge about what compilers support which options, and since which versions. This avoids a number of configure time checks, speeding up the cmake configuration.
This avoids erroneously adding this option with GCC, which doesn't really support it.
If testing for a warning option like -Wno- with GCC, GCC won't print any diagnostic at all, leading to the options being accepted incorrectly. However later, if compiling a file that actually prints another warning, GCC will also print warnings about these -Wno- options being unrecognized.
This avoids extra warning spam like this, for every source file that does produce warnings with GCC: