There are no -Wtautological-constant-in-range-compare warnings in C or C++ code in mozilla-central, so we can enable this warning.
However, the -Wtautological-constant-in-range-compare flag also enables -Wtautological-value-range-compare warnings and there are some -Wtautological-value-range-compare warnings in some third-party C code.
I filed https://bugs.chromium.org/p/google-breakpad/issues/detail?id=859 for the Google Breakpad warning.
---
toolkit/crashreporter/google-breakpad/src/third_party/libdisasm/ia32_invariant.c:112:30 [-Wtautological-value-range-compare] result of comparison of 3-bit unsigned value == 101 is always false
js/src/zydis/Zydis/Decoder.c:2200:43 [-Wtautological-value-range-compare] result of comparison of 2-bit unsigned value < 4 is always true
js/src/zydis/Zydis/Decoder.c:2213:43 [-Wtautological-value-range-compare] result of comparison of 2-bit unsigned value < 4 is always true
js/src/zydis/Zydis/Decoder.c:2226:43 [-Wtautological-value-range-compare] result of comparison of 2-bit unsigned value < 4 is always true
js/src/zydis/Zydis/Decoder.c:3650:46 [-Wtautological-value-range-compare] result of comparison of 3-bit unsigned value < 8 is always true
js/src/zydis/Zydis/SharedData.c:119:47 [-Wtautological-value-range-compare] result of comparison of 15-bit unsigned value != 65535 is always true
third_party/aom/aom_dsp/intrapred.c:94:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
third_party/aom/aom_dsp/intrapred.c:123:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
third_party/aom/aom_dsp/intrapred.c:152:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
third_party/aom/aom_dsp/intrapred.c:413:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
third_party/aom/aom_dsp/intrapred.c:444:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
third_party/aom/aom_dsp/intrapred.c:475:3 [-Wtautological-value-range-compare] result of comparison of 4-bit unsigned value < 31 is always true
Differential Revision: https://phabricator.services.mozilla.com/D165522
This doesn't build with release branding, but allows you to create a
nightly build that has all the settings that we have on release, which
will be useful for profiling.
I could use --enable-release with a bit of effort, if you prefer
(probably renaming the current version of --enable-release to something
else).
All-in-all, suggestions welcome on this approach.
Differential Revision: https://phabricator.services.mozilla.com/D165219
Because this involves affecting the MSVC + Windows SDK packs, we need to
do this for toolchain tasks as well as Firefox builds in a single pass.
The MSVC + Windows SDK packs are altered to keep the original case
instead of lowercasing everything (except .lib files), and contain
an overlay file that we now automatically use from the WINSYSROOT.
This requires adjusting some paths to match what the original case
is, as well as removing everything related to the use of liblowercase,
which conflicts with the use of the overlay file. People using
liblowercase locally will still have a working setup as long as they
don't set WINSYSROOT (it's new, so they won't have it), and don't have
an overlay file in there (which they only would if they ran the new
pack_vs.py).
Differential Revision: https://phabricator.services.mozilla.com/D165596
The dependency of vc_compiler_paths_for_version on both --with-visual-studio-version
and VC_PATH is going to cause problems in the forthcoming changes.
Differential Revision: https://phabricator.services.mozilla.com/D165589
The main complication in get_sdk_dirs is supporting the different SDK
shapes between SDK 8.1 and 10, but we actually only support SDK 10 since
bug 1380609, so we can just simplify it all.
Differential Revision: https://phabricator.services.mozilla.com/D165585
We can enable C++20 -Wvolatile warnings in gcc before we compile as -std=c++20, but not in clang. These warnings will be enabled by default with gcc and clang -std=c++20, so we won't need to explicitly enable -Wvolatile after we're compiling as -std=c++20.
Differential Revision: https://phabricator.services.mozilla.com/D165380