compilers: force clang to error on unknown warning options - #15714
compilers: force clang to error on unknown warning options#15714tristan957 wants to merge 1 commit into
Conversation
d580eff to
e875e03
Compare
|
Also it's probably best to take the occasion and synchronize the handling of clang (which adds the arguments in |
|
I agree with bonzini, using the sanity check args makes more sense. I'm also concerned putting it in always args is going to break builds of projects that blinding add arguments on "is linux" or "is clang" |
e875e03 to
beb6536
Compare
|
Great suggestions! Here is an update...4 months later 😆. |
|
This is blocked by #16142. |
beb6536 to
1b1422e
Compare
Whoops ;) |
1b1422e to
6860e65
Compare
|
Silly... |
1abc513 to
290ace5
Compare
gcc will error by default if an unknown warning option is passed to it:
CC=gcc meson setup build -Dc_args=-Wbad
gcc will fail in the project() call during the sanity check. clang does
not currently doing that:
CC=clang meson setup build -Dc_args=-Wbad
...will continue until an actual compilation like cc.compiles()
from meson-log.txt...
Sanity check compile stderr:
warning: unknown warning option '-Wbad' [-Wunknown-warning-option]
We should error in the sanity check to notify the user as soon as
possible that they have errors in their environment.
Signed-off-by: Tristan Partin <tristan@partin.io>
290ace5 to
ebe7678
Compare
|
Do not do change-detector tests I agree with @thesamesam that the change is good, but can you please remove the internaltests change? Having |
gcc seems to error by default if an unknown warning option is passed to it:
gcc will fail in the project() call during the sanity check. clang does not currently doing that:
We should error in the sanity check to notify the user as soon as possible that they have errors in their environment.