Commit 8c253e8
committed
[cmake] Fix detecting -Wno-pass-failed
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
This used to be how most warning options were detected in
HandleLLVMOptions.cmake. However, in
4feae05, many of these checks
were rewritten to avoid trying compilation and just relying on
hardcoded knowledge about which compilers and versions thereof
support which warnings, to speed up the cmake configuration.
See e546bbf for an earlier
fix of similar options (for LLDB).1 parent 0dff52b commit 8c253e8
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
971 | | - | |
| 971 | + | |
| 972 | + | |
972 | 973 | | |
973 | 974 | | |
974 | 975 | | |
| |||
0 commit comments