Bug 1461304 - Windows bustage eg: /js/src/wasm/WasmBinaryToAST.cpp when Gecko 62 merges to Beta on 2018-06-14. r=froydnj.

Some configurations of SpiderMonkey wind up producing C++ switch statements of
the form

   switch (..) {
     default: break;
   }

We hoped that they would simply be optimised out without comment.  But MSVC
warns about the lack of non-default cases, which then are escalated into
errors, causing the build to fail.  This commit simply disables that warning
feature when building with MSVC.

--HG--
extra : rebase_source : 468022d30cdaf483aaa64fc7aa9dd1308fbc7335
This commit is contained in:
Julian Seward 2018-05-27 09:39:06 +02:00
Родитель 1879873837
Коммит fef50df448
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -712,6 +712,9 @@ case "$target" in
# the same thing as C4244, we disable C4267, too.
CFLAGS="$CFLAGS -wd4244 -wd4267"
CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251"
# Silence "warning C4065: switch statement contains 'default' but no
# 'case' labels". See bug 1461304.
CXXFLAGS="$CXXFLAGS -wd4065"
if test -n "$CLANG_CL"; then
# XXX We should combine some of these with our generic GCC-style
# warning checks.

Просмотреть файл

@ -943,6 +943,9 @@ case "$target" in
# may not be declared inline, as of VS2015 Update 2.
CFLAGS="$CFLAGS -wd4244 -wd4267"
CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4800 -wd4595"
# Silence "warning C4065: switch statement contains 'default' but no
# 'case' labels". See bug 1461304.
CXXFLAGS="$CXXFLAGS -wd4065"
if test -n "$CLANG_CL"; then
# XXX We should combine some of these with our generic GCC-style
# warning checks.