automatically --enable-warnings-as-errors when using ~/.mozbuild/clang/bin/clang*
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
People
(Reporter: froydnj, Unassigned)
Details
Since the ~/.mozbuild/clang/bin/clang* compiler binaries are (presumably) the same binaries that we use on automation and therefore are issuing the exact same warnings as the compilers we use in automation, we ought to be able to turn on --enable-warnings-as-errors automatically. (We haven't done this in the past because of compiler version mismatches and warning mismatches.) This would catch errors earlier for people than pushing to try (or inbound).
One wrinkle mentioned on IRC is that --enable-warnings-with-errors apparently throws spurious errors with icecc (and with sccache?). So that would be something that would need to be ironed out first, or we'd just not flip the switch if you were using icecc.
Comment 1•6 years ago
|
||
I can also see things going wrong depending on the configure flags used. On Android, the ndk and sdk are also involved. On other platforms, system headers may come with interesting problems.
That being said, the build system also gathers the warnings and re-prints them at the end of the build. That kind of makes them prominent when the build succeeds. Shouldn't that be enough? That is, if you see something there, you should know something is wrong. I can imagine there are warnings that we do -Wno-error on --enable-warnings-with-errors, but maybe it's time to discuss whether those should be turned to -Wno. I mean, we're not looking at them anyways...
Reporter | ||
Comment 2•6 years ago
|
||
It's possible fine-tuning is involved. This bug was motivated by a request on #developers
:
I see -Wreorder errors when I pushed to try, is there a way that I should modify my config file so that I can catch these errors locally?
and those, at least, we could have caught locally.
It's very possible that we have so much warning spam from other places that the actual warnings get drowned in the noise, though. My local build this morning just said "877 compiler warnings present" and didn't actually list any of the warnings...
Updated•2 years ago
|
Description
•