Bug 802352 - Port |Bug 797049 - Disable C4351 as an MSVC warning about a change to be standards-compliant in MSVC2005 (!). Also sync up warning-disabling between configure.in and js/src/configure.in, and add comments about the warnings being disabled| to comm-central r=callek

This commit is contained in:
Ian Neal 2012-11-10 13:18:57 +00:00
Родитель a9b356ae67
Коммит dec32c9461
1 изменённых файлов: 27 добавлений и 23 удалений

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

@ -1744,7 +1744,16 @@ ia64*-hpux*)
_DEFINES_CXXFLAGS='-FI $(DEPTH)/comm-config.h -DMOZILLA_CLIENT' _DEFINES_CXXFLAGS='-FI $(DEPTH)/comm-config.h -DMOZILLA_CLIENT'
CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)" CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)" CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
CXXFLAGS="$CXXFLAGS -wd4800" # disable warning "forcing value to bool" # MSVC warning C4345 warns of newly conformant behavior as of VS2003.
# MSVC warning C4351 warns of newly conformant behavior as of VS2005.
# MSVC warning C4800 warns when a value is implicitly cast to bool,
# because this also forces narrowing to a single byte, which can be a
# perf hit. But this matters so little in practice (and often we want
# that behavior) that it's better to turn it off.
CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800"
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib"
MOZ_DEBUG_FLAGS='-Zi' MOZ_DEBUG_FLAGS='-Zi'
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
@ -1757,24 +1766,22 @@ ia64*-hpux*)
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib' XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib' LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
if test $_MSC_VER -ge 1400; then LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" dnl For profile-guided optimization
dnl For profile-guided optimization PROFILE_GEN_CFLAGS="-GL"
PROFILE_GEN_CFLAGS="-GL" PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" dnl XXX: PGO builds can fail with warnings treated as errors,
dnl XXX: PGO builds can fail with warnings treated as errors, dnl specifically "no profile data available" appears to be
dnl specifically "no profile data available" appears to be dnl treated as an error sometimes. This might be a consequence
dnl treated as an error sometimes. This might be a consequence dnl of using WARNINGS_AS_ERRORS in some modules, combined
dnl of using WARNINGS_AS_ERRORS in some modules, combined dnl with the linker doing most of the work in the whole-program
dnl with the linker doing most of the work in the whole-program dnl optimization/PGO case. I think it's probably a compiler bug,
dnl optimization/PGO case. I think it's probably a compiler bug, dnl but we work around it here.
dnl but we work around it here. PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul. dnl Probably also a compiler bug, but what can you do?
dnl Probably also a compiler bug, but what can you do? PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" LDFLAGS="$LDFLAGS -DYNAMICBASE"
LDFLAGS="$LDFLAGS -DYNAMICBASE"
fi
fi fi
MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,jpeg32$(VERSION_NUMBER),$(DEPTH)/mozilla/jpeg)' MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,jpeg32$(VERSION_NUMBER),$(DEPTH)/mozilla/jpeg)'
MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,png,$(DEPTH)/mozilla/modules/libimg/png)' MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,png,$(DEPTH)/mozilla/modules/libimg/png)'
@ -1836,16 +1843,13 @@ ia64*-hpux*)
AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.]) AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.])
fi fi
if test $_MSC_VER -ge 1400; then
LDFLAGS="$LDFLAGS -SAFESEH"
fi
if test -n "$GNU_CC"; then if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport" CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport" CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
else else
AC_DEFINE(HAVE_STDCALL) AC_DEFINE(HAVE_STDCALL)
DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
LDFLAGS="$LDFLAGS -SAFESEH"
fi fi
AC_DEFINE(_X86_) AC_DEFINE(_X86_)