mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00

MSVC 2017 headers aren't warning free at the -Wall level. Since PSM enables -Wall in some moz.build files, this breaks --enable-warnings-as-errors builds. As a temporary measure, disable enough warnings to get working builds. MozReview-Commit-ID: G0oUsAYYct2 --HG-- extra : rebase_source : dc37783c89e66a54510c9940f9eaa5a4340ef43e
54 lines
2.2 KiB
Plaintext
54 lines
2.2 KiB
Plaintext
if CONFIG['CLANG_CXX']:
|
|
CXXFLAGS += [
|
|
'-Weverything',
|
|
|
|
'-Wno-c++98-compat',
|
|
'-Wno-c++98-compat-pedantic',
|
|
'-Wno-missing-prototypes',
|
|
'-Wno-missing-variable-declarations',
|
|
'-Wno-padded',
|
|
'-Wno-reserved-id-macro', # NSPR and NSS use reserved IDs in their include guards.
|
|
'-Wno-shadow', # XXX: Clang's rules are too strict for constructors.
|
|
'-Wno-weak-vtables', # We rely on the linker to merge the duplicate vtables.
|
|
]
|
|
elif CONFIG['_MSC_VER']:
|
|
CXXFLAGS += [
|
|
'-sdl', # Enable additional security checks based on Microsoft's SDL.
|
|
|
|
'-Wall',
|
|
|
|
'-wd4464', # relative include path contains '..'
|
|
'-wd4514', # 'function': unreferenced inline function has been removed
|
|
'-wd4668', # warning C4668: 'X' is not defined as a preprocessor macro,
|
|
# replacing with '0' for '#if/#elif'.
|
|
'-wd4710', # 'function': function not inlined
|
|
'-wd4711', # function 'function' selected for inline expansion
|
|
'-wd4800', # forcing value to bool 'true' or 'false'
|
|
'-wd4820', # 'bytes' bytes padding added after construct 'member_name'
|
|
|
|
# The following warnings are disabled because MSVC 2017 headers aren't
|
|
# warning free at the -Wall level.
|
|
'-wd4365', # 'action' : conversion from 'type_1' to 'type_2',
|
|
# signed/unsigned mismatch
|
|
'-wd4619', # #pragma warning : there is no warning number 'number'
|
|
'-wd4623', # 'derived class' : default constructor was implicitly defined as
|
|
# deleted because a base class default constructor is
|
|
# inaccessible or deleted
|
|
'-wd4774', # '<function>' : format string expected in argument <position> is
|
|
# not a string literal
|
|
'-wd4987', # nonstandard extension used: 'throw (...)'
|
|
|
|
# XXX: We cannot use /Za (Disable Microsoft Extensions) because windows.h
|
|
# won't copmile with it.
|
|
'-Zc:forScope', # Standard C++ rules for variable scope in for loops.
|
|
'-Zc:inline', # Standard C++ rules requiring definition inline functions.
|
|
'-Zc:rvalueCast', # Standard C++ rules for result of cast being an rvalue.
|
|
'-Zc:strictStrings', # Standard C++ rule that string literals are const.
|
|
]
|
|
else:
|
|
CXXFLAGS += [
|
|
'-Wall',
|
|
'-Wextra',
|
|
'-pedantic-errors',
|
|
]
|