Bug 1031352 - move most of the _MSC_VER references in Makefile.in to moz.build; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Fri, 27 Jun 2014 10:32:05 -0400
changeset 214002 d8898e75b50dfc54766b01a2f094ae761d2df9fd
parent 214001 3d0c2add55f6ddb43db619cbff606e14f5fd0630
child 214003 f5138653a32a32bd8a8187f1e34e129da819b082
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1031352
milestone33.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 1031352 - move most of the _MSC_VER references in Makefile.in to moz.build; r=glandium
browser/installer/Makefile.in
intl/unicharutil/util/Makefile.in
intl/unicharutil/util/moz.build
js/src/Makefile.in
js/src/moz.build
xpcom/glue/Makefile.in
xpcom/glue/moz.build
xpcom/glue/nomozalloc/Makefile.in
xpcom/glue/nomozalloc/moz.build
xpcom/glue/standalone/Makefile.in
xpcom/glue/standalone/moz.build
xpcom/glue/standalone/staticruntime/Makefile.in
xpcom/glue/standalone/staticruntime/moz.build
xpcom/glue/staticruntime/Makefile.in
xpcom/glue/staticruntime/moz.build
xpcom/typelib/xpt/Makefile.in
xpcom/typelib/xpt/moz.build
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -50,20 +50,16 @@ endif
 ifdef MOZ_NATIVE_NSS
 DEFINES += -DMOZ_NATIVE_NSS=1
 endif
 
 ifdef NSS_DISABLE_DBM
 DEFINES += -DNSS_DISABLE_DBM=1
 endif
 
-ifdef _MSC_VER
-DEFINES += -D_MSC_VER=$(_MSC_VER)
-endif
-
 DEFINES += -DJAREXT=
 
 ifdef MOZ_ANGLE_RENDERER
 DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER)
 ifdef MOZ_D3DCOMPILER_VISTA_DLL
 DEFINES += -DMOZ_D3DCOMPILER_VISTA_DLL=$(MOZ_D3DCOMPILER_VISTA_DLL)
 endif
 ifdef MOZ_D3DCOMPILER_XP_DLL
--- a/intl/unicharutil/util/Makefile.in
+++ b/intl/unicharutil/util/Makefile.in
@@ -10,14 +10,8 @@
 DIST_INSTALL = 1
 SDK_LIBRARY = $(LIBRARY)
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef ENABLE_INTL_API
 LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
 endif
-
-ifdef _MSC_VER
-# Don't include directives about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -28,8 +28,11 @@ FORCE_STATIC_LIB = True
 LOCAL_INCLUDES += [
     '../src',
 ]
 
 USE_STATIC_LIBS = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -227,22 +227,16 @@ DEFINES += -DUSE_ZLIB
 endif
 
 ifdef MOZ_SHARED_ICU
 EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
 else
 SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS)
 endif
 
-# Prevent floating point errors caused by VC++ optimizations
-ifdef _MSC_VER
-# XXX We should add this to CXXFLAGS, too?
-CFLAGS += -fp:precise
-endif # _MSC_VER
-
 ifeq ($(OS_ARCH),FreeBSD)
 EXTRA_LIBS	+= -pthread
 endif
 ifeq ($(OS_ARCH),Linux)
 EXTRA_LIBS	+= -ldl
 endif
 # Silence warnings on AIX/HP-UX from non-GNU compilers
 ifndef GNU_CC
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -453,14 +453,17 @@ if CONFIG['JS_HAS_CTYPES']:
 if CONFIG['MOZ_LINKER']:
     DEFINES['MOZ_LINKER'] = True
 
 if CONFIG['_MSC_VER']:
     if CONFIG['CPU_ARCH'] == 'x86':
         SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303
     elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']:
         SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661
+    # Prevent floating point errors caused by VC++ optimizations
+    # XXX We should add this to CXXFLAGS, too?
+    CFLAGS += ['-fp:precise']
 
 # Needed to "configure" it correctly.  Unfortunately these
 # flags wind up being applied to all code in js/src, not just
 # the code in js/src/assembler.
 DEFINES['USE_SYSTEM_MALLOC'] = 1
 DEFINES['ENABLE_ASSEMBLER'] = 1
--- a/xpcom/glue/Makefile.in
+++ b/xpcom/glue/Makefile.in
@@ -1,15 +1,6 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-# Don't include directives about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -100,15 +100,18 @@ LIBRARY_NAME = 'xpcomglue_s'
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s', CONFIG['LIB_SUFFIX']),
 ]
 
 FORCE_STATIC_LIB = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
 
 LOCAL_INCLUDES += [
     '../build',
 ]
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
--- a/xpcom/glue/nomozalloc/Makefile.in
+++ b/xpcom/glue/nomozalloc/Makefile.in
@@ -1,15 +1,6 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-# Don't include directives about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/glue/nomozalloc/moz.build
+++ b/xpcom/glue/nomozalloc/moz.build
@@ -20,16 +20,19 @@ SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_s_nomozalloc', CONFIG['LIB_SUFFIX']),
 ]
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
 
 DEFINES['MOZ_NO_MOZALLOC'] = True
 
 LOCAL_INCLUDES += [
     '../../build',
 ]
 
 # Pretend we're statically linking the CRT, even though we might not be: this
--- a/xpcom/glue/standalone/Makefile.in
+++ b/xpcom/glue/standalone/Makefile.in
@@ -1,15 +1,6 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-# Don't include directives in obj files about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -27,16 +27,19 @@ EXPORTS += [
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue', CONFIG['LIB_SUFFIX']),
 ]
 
 FORCE_STATIC_LIB = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
 
 DEFINES['XPCOM_GLUE'] = True
 
 LOCAL_INCLUDES += [
     '../../build',
 ]
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
--- a/xpcom/glue/standalone/staticruntime/Makefile.in
+++ b/xpcom/glue/standalone/staticruntime/Makefile.in
@@ -1,14 +1,5 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-# Don't include directives in obj files about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/glue/standalone/staticruntime/moz.build
+++ b/xpcom/glue/standalone/staticruntime/moz.build
@@ -19,16 +19,19 @@ SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime', CONFIG['LIB_SUFFIX']),
 ]
 
 # create a static lib
 FORCE_STATIC_LIB = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
 
 DEFINES['XPCOM_GLUE'] = True
 
 LOCAL_INCLUDES += [
     '../../../build',
 ]
 
 # Statically link to the CRT on Windows
--- a/xpcom/glue/staticruntime/Makefile.in
+++ b/xpcom/glue/staticruntime/Makefile.in
@@ -1,15 +1,6 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-# Don't include directives about which CRT to use
-OS_COMPILE_CXXFLAGS += -Zl
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/glue/staticruntime/moz.build
+++ b/xpcom/glue/staticruntime/moz.build
@@ -19,16 +19,19 @@ LIBRARY_NAME = 'xpcomglue_staticruntime_
 SDK_LIBRARY = [
     "%s%s.%s" % (CONFIG['LIB_PREFIX'], 'xpcomglue_staticruntime_s', CONFIG['LIB_SUFFIX']),
 ]
 
 FORCE_STATIC_LIB = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
+    # Don't include directives about which CRT to use
+    CFLAGS += ['-Zl']
+    CXXFLAGS += ['-Zl']
 
 LOCAL_INCLUDES += [
     '../../build',
 ]
 
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = True
 
--- a/xpcom/typelib/xpt/Makefile.in
+++ b/xpcom/typelib/xpt/Makefile.in
@@ -1,12 +1,6 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIST_INSTALL	= 1
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef _MSC_VER
-OS_COMPILE_CFLAGS += -Zl
-endif
--- a/xpcom/typelib/xpt/moz.build
+++ b/xpcom/typelib/xpt/moz.build
@@ -21,8 +21,11 @@ EXPORTS += [
 ]
 
 FINAL_LIBRARY = 'xpcom_core'
 
 GENERATED_INCLUDES += ['/xpcom/base']
 LOCAL_INCLUDES += ['/xpcom/base']
 
 FAIL_ON_WARNINGS = True
+
+if CONFIG['_MSC_VER']:
+    CFLAGS += ['-Zl']