Bug 786579 - Remove old MSVC (<=2003) support. r=khuey
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 28 Sep 2012 16:02:40 +0900
changeset 108416 ab977a3ebe90a6c183accfd6a1e9bc10af9f0115
parent 108415 005ccc9a2f2f536ca16f1d8d0d9c63ba2a9359ba
child 108417 dcdda4778cef302342dc5647ddfc8523bad85189
push id23564
push useremorley@mozilla.com
push dateFri, 28 Sep 2012 23:09:34 +0000
treeherdermozilla-central@b62b229a4d41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs786579
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 786579 - Remove old MSVC (<=2003) support. r=khuey
config/rules.mk
configure.in
content/Makefile.in
js/src/config/rules.mk
js/src/configure.in
js/xpconnect/src/Makefile.in
xpcom/glue/SSE.cpp
xpcom/glue/SSE.h
xpcom/glue/nsCOMPtr.h
xpcom/string/public/nsAString.h
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1574,23 +1574,16 @@ endef
  )
 
 ################################################################################
 # Special gmake rules.
 ################################################################################
 
 
 #
-# Disallow parallel builds with MSVC < 8
-#
-ifneq (,$(filter 1200 1300 1310,$(_MSC_VER)))
-.NOTPARALLEL:
-endif
-
-#
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
 #
 .SUFFIXES:
 
 #
 # Fake targets.  Always run these rules, even if a file/directory with that
 # name already exists.
--- a/configure.in
+++ b/configure.in
@@ -2205,34 +2205,32 @@ ia64*-hpux*)
         MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
         WARNINGS_AS_ERRORS='-WX'
         MOZ_OPTIMIZE_FLAGS='-O1'
         MOZ_FIX_LINK_PATHS=
         DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.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'
         MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
-        if test $_MSC_VER -ge 1400; then
-            LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
-            dnl For profile-guided optimization
-            PROFILE_GEN_CFLAGS="-GL"
-            PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
-            dnl XXX: PGO builds can fail with warnings treated as errors,
-            dnl specifically "no profile data available" appears to be
-            dnl treated as an error sometimes. This might be a consequence
-            dnl of using WARNINGS_AS_ERRORS in some modules, combined
-            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 but we work around it here.
-            PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
-            dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
-            dnl Probably also a compiler bug, but what can you do?
-            PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
-            LDFLAGS="$LDFLAGS -DYNAMICBASE"
-        fi
+        LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
+        dnl For profile-guided optimization
+        PROFILE_GEN_CFLAGS="-GL"
+        PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
+        dnl XXX: PGO builds can fail with warnings treated as errors,
+        dnl specifically "no profile data available" appears to be
+        dnl treated as an error sometimes. This might be a consequence
+        dnl of using WARNINGS_AS_ERRORS in some modules, combined
+        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 but we work around it here.
+        PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
+        dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
+        dnl Probably also a compiler bug, but what can you do?
+        PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
+        LDFLAGS="$LDFLAGS -DYNAMICBASE"
     fi
     AC_DEFINE(HAVE_SNPRINTF)
     AC_DEFINE(_WINDOWS)
     AC_DEFINE(WIN32)
     AC_DEFINE(XP_WIN)
     AC_DEFINE(XP_WIN32)
     AC_DEFINE(HW_THREADS)
     AC_DEFINE(STDC_HEADERS)
@@ -2280,27 +2278,24 @@ ia64*-hpux*)
     esac
 
     case "$target" in
     i*86-*)
         if test "$HAVE_64BIT_OS"; then
             AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.])
         fi
 
-        if test $_MSC_VER -ge 1400; then
-            LDFLAGS="$LDFLAGS -SAFESEH"
-        fi
-
         if test -n "$GNU_CC"; then
             CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
             CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
             LDFLAGS="$LDFLAGS -Wl,--enable-stdcall-fixup"
         else
             AC_DEFINE(HAVE_STDCALL)
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
+            LDFLAGS="$LDFLAGS -SAFESEH"
         fi
 
     	AC_DEFINE(_X86_)
 	;;
     x86_64-*)
         if test -n "$_WIN32_MSVC"; then
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
         fi
--- a/content/Makefile.in
+++ b/content/Makefile.in
@@ -20,18 +20,9 @@ endif
 ifdef MOZ_XTF
 PARALLEL_DIRS   += xtf
 endif
 
 ifdef ENABLE_TESTS
 TOOL_DIRS += test
 endif
 
-# Prevent floating point errors caused by VC++ optimizations
-ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
-ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
-CFLAGS += -Op
-else
-CFLAGS += -fp:precise
-endif
-endif # WINNT
-
 include $(topsrcdir)/config/rules.mk
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1574,23 +1574,16 @@ endef
  )
 
 ################################################################################
 # Special gmake rules.
 ################################################################################
 
 
 #
-# Disallow parallel builds with MSVC < 8
-#
-ifneq (,$(filter 1200 1300 1310,$(_MSC_VER)))
-.NOTPARALLEL:
-endif
-
-#
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
 #
 .SUFFIXES:
 
 #
 # Fake targets.  Always run these rules, even if a file/directory with that
 # name already exists.
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1773,34 +1773,32 @@ ia64*-hpux*)
         WARNINGS_AS_ERRORS='-WX'
         MOZ_OPTIMIZE_FLAGS="-O2"
         MOZ_JS_LIBS='$(libdir)/mozjs.lib'
         MOZ_FIX_LINK_PATHS=
         DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.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'
         MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
-        if test $_MSC_VER -ge 1400; then
-            LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
-            dnl For profile-guided optimization
-            PROFILE_GEN_CFLAGS="-GL"
-            PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
-            dnl XXX: PGO builds can fail with warnings treated as errors,
-            dnl specifically "no profile data available" appears to be
-            dnl treated as an error sometimes. This might be a consequence
-            dnl of using WARNINGS_AS_ERRORS in some modules, combined
-            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 but we work around it here.
-            PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
-            dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
-            dnl Probably also a compiler bug, but what can you do?
-            PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
-            LDFLAGS="$LDFLAGS -DYNAMICBASE"
-        fi
+        LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
+        dnl For profile-guided optimization
+        PROFILE_GEN_CFLAGS="-GL"
+        PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
+        dnl XXX: PGO builds can fail with warnings treated as errors,
+        dnl specifically "no profile data available" appears to be
+        dnl treated as an error sometimes. This might be a consequence
+        dnl of using WARNINGS_AS_ERRORS in some modules, combined
+        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 but we work around it here.
+        PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
+        dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
+        dnl Probably also a compiler bug, but what can you do?
+        PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
+        LDFLAGS="$LDFLAGS -DYNAMICBASE"
     fi
     AC_DEFINE(HAVE_SNPRINTF)
     AC_DEFINE(_WINDOWS)
     AC_DEFINE(WIN32)
     AC_DEFINE(XP_WIN)
     AC_DEFINE(XP_WIN32)
     AC_DEFINE(HW_THREADS)
     AC_DEFINE(STDC_HEADERS)
@@ -1847,25 +1845,22 @@ ia64*-hpux*)
     esac
 
     case "$target" in
     i*86-*)
         if test "$HAVE_64BIT_OS"; then
             AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.])
         fi
 
-        if test $_MSC_VER -ge 1400; then
-            LDFLAGS="$LDFLAGS -SAFESEH"
-        fi
-
         if test -n "$GNU_CC"; then
             CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
             CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
         else
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
+            LDFLAGS="$LDFLAGS -SAFESEH"
         fi
 
     	AC_DEFINE(_X86_)
 	;;
     x86_64-*)
         if test -n "$_WIN32_MSVC"; then
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
         fi
--- a/js/xpconnect/src/Makefile.in
+++ b/js/xpconnect/src/Makefile.in
@@ -93,30 +93,16 @@ DEFINES += \
   -DEXPORT_XPC_API \
   -DNO_NSPR_10_SUPPORT \
   $(NULL)
 
 ifdef MOZ_JSDEBUGGER
 DEFINES += -DMOZ_JSDEBUGGER
 endif
 
-ifeq ($(OS_ARCH),WINNT)
-ifndef GNU_CXX
-ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
-# whole program optimization and precompiled headers are incompatible
-ifeq (,$(findstring GL,$(CXXFLAGS)))
-# use pre-compiled headers
-CXXFLAGS	+= -YX -Fp$(LIBRARY_NAME).pch
-# precompiled headers require write access to .pch which breaks -j builds
-.NOTPARALLEL:
-endif
-endif
-endif
-endif
-
 nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h
 
 XPCJSRuntime.$(OBJ_SUFFIX): dom_quickstubs.h
 
 dom_quickstubs.h: dom_quickstubs.cpp
 
 dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
                     $(srcdir)/qsgen.py \
--- a/xpcom/glue/SSE.cpp
+++ b/xpcom/glue/SSE.cpp
@@ -24,17 +24,17 @@ enum CPUIDRegister { eax = 0, ebx = 1, e
 static bool
 has_cpuid_bit(unsigned int level, CPUIDRegister reg, unsigned int bit)
 {
   unsigned int regs[4];
   return __get_cpuid(level, &regs[0], &regs[1], &regs[2], &regs[3]) &&
          (regs[reg] & bit);
 }
 
-#elif defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(_M_IX86) || defined(_M_AMD64))
+#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
 
 // MSVC 2005 or newer on x86-32 or x86-64
 #include <intrin.h>
 
 enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 };
 
 static bool
 has_cpuid_bit(unsigned int level, CPUIDRegister reg, unsigned int bit)
--- a/xpcom/glue/SSE.h
+++ b/xpcom/glue/SSE.h
@@ -128,20 +128,17 @@
 #endif
 
 #ifdef HAVE_CPUID_H
   #define MOZILLA_SSE_HAVE_CPUID_DETECTION
 #endif
 
 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
 
-#if _MSC_VER >= 1400
-  // MSVC 2005 or newer on x86 or amd64
-  #define MOZILLA_SSE_HAVE_CPUID_DETECTION
-#endif
+#define MOZILLA_SSE_HAVE_CPUID_DETECTION
 
 #if defined(_M_IX86_FP)
 
 #if _M_IX86_FP >= 1
   // It's ok to use SSE instructions based on the /arch option
   #define MOZILLA_PRESUME_SSE
 #endif
 #if _M_IX86_FP >= 2
--- a/xpcom/glue/nsCOMPtr.h
+++ b/xpcom/glue/nsCOMPtr.h
@@ -1417,25 +1417,16 @@ operator!=( const U* lhs, const nsCOMPtr
 
   // To avoid ambiguities caused by the presence of builtin |operator==|s
   // creating a situation where one of the |operator==| defined above
   // has a better conversion for one argument and the builtin has a
   // better conversion for the other argument, define additional
   // |operator==| without the |const| on the raw pointer.
   // See bug 65664 for details.
 
-// This is defined by an autoconf test, but VC++ also has a bug that
-// prevents us from using these.  (It also, fortunately, has the bug
-// that we don't need them either.)
-#if defined(_MSC_VER) && (_MSC_VER < 1310)
-#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
-#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ
-#endif
-#endif
-
 #ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
 template <class T, class U>
 inline
 bool
 operator==( const nsCOMPtr<T>& lhs, U* rhs )
   {
     return static_cast<const T*>(lhs.get()) == const_cast<const U*>(rhs);
   }
--- a/xpcom/string/public/nsAString.h
+++ b/xpcom/string/public/nsAString.h
@@ -13,17 +13,17 @@
 
 #ifndef nsStringIterator_h___
 #include "nsStringIterator.h"
 #endif
 
 // If some platform(s) can't handle our template that matches literal strings,
 // then we'll disable it on those platforms.
 #ifndef NS_DISABLE_LITERAL_TEMPLATE
-#  if (defined(_MSC_VER) && (_MSC_VER < 1310)) || (defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x560)) || (defined(__HP_aCC) && (__HP_aCC <= 012100))
+#  if (defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x560)) || (defined(__HP_aCC) && (__HP_aCC <= 012100))
 #    define NS_DISABLE_LITERAL_TEMPLATE
 #  endif
 #endif /* !NS_DISABLE_LITERAL_TEMPLATE */
 
 #include <string.h>
 #include <stdarg.h>
 
 #include "mozilla/fallible.h"