Enable on Windows the same warnings as on other platforms
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox101 fixed)
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: bryce, Assigned: glandium)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
Clang's thread-safety annotations do not appear to trigger warnings on Windows when they do on other platforms. I've attached a small patch that shows changes that should create such a violation.
Changing my mozconfig to include the additional lines
export CFLAGS="-Wthread-safety -Werror=thread-safety"
export CXXFLAGS="-Wthread-safety -Werror=thread-safety"
results in the expected warnings.
I've also tried changing this line to
when=depends(c_compiler)(lambda c: c.type in ["clang", "clang-cl"] and c.version >= "8.0"),
with no mozconfig changes and I don't see any warnings. I've also tried removing the condition and just setting
check_and_add_gcc_warning("-Wthread-safety")
and that also did not produce warnings.
Assignee | ||
Comment 1•2 years ago
|
||
There are historic reasons we use different warning flags on Windows (hint: MSVC), but they don't apply anymore. I actually have some work in progress to enable everything that is enabled on other platforms on Windows.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
I'm attempting to land bug 1762839 now, and hope bug 1762490 can be landed soon(ish). Those are the only remaining blockers for me to get a local build happy.
Assignee | ||
Comment 3•2 years ago
|
||
This allows to remove the requirement on "--help" for dependable(),
which avoids dependable() implying the execution of when
when it's
within a with only_when
.
Assignee | ||
Comment 4•2 years ago
|
||
This is in preparation for those functions taking care of all platforms
and compilers.
Assignee | ||
Comment 5•2 years ago
|
||
This moves the manual addition of some flags from old-configure to
python configure, and disables the set of flags that still trigger a
bunch of warnings (which -Werror turns into bustage).
Assignee | ||
Comment 6•2 years ago
|
||
The attached patches enable everything but:
- -Wcomma
- -Wunreachable-code-return
- -Wunreachable-code
- -Wignored-qualifiers
- -Wbitfield-enum-conversion
- -Wclass-varargs
- -Wimplicit-fallthrough
- -Wsign-compare
- -Wthread-safety
I have patches for most of them, except -Wthread-safety. I will file separate bugs for each of those next week.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/53c3a90bae93 Allow plain values instead of functions for depends()(). r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/d2355490a174 Remove `gcc` from warning and flag function names. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/e4effc1c1878 Enable most of the same warnings on Windows as on other platforms. r=firefox-build-system-reviewers,andi
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/53c3a90bae93
https://hg.mozilla.org/mozilla-central/rev/d2355490a174
https://hg.mozilla.org/mozilla-central/rev/e4effc1c1878
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/bdcda82fcfab adjust comm-central for "Enable on Windows the same warnings as on other platforms". rs=bustage-fix
Description
•