Bug 1230071 - Enable warnings-as-errors in js/src. r=Waldo
authorChris Peterson <cpeterson@mozilla.com>
Fri, 27 Nov 2015 22:47:09 -0800
changeset 309741 0ea205e989559a0e791a9fdaef35146739466cde
parent 309740 ca9261497284b3267b33ddc94a77f0e4261e46b6
child 309742 f23035b9e6bd5ef0bf0be87f96c4c2b9b7417908
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1230071
milestone45.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 1230071 - Enable warnings-as-errors in js/src. r=Waldo
js/src/jsapi-tests/moz.build
js/src/moz.build
js/src/shell/moz.build
--- a/js/src/jsapi-tests/moz.build
+++ b/js/src/jsapi-tests/moz.build
@@ -114,11 +114,8 @@ LOCAL_INCLUDES += [
     '..',
 ]
 
 USE_LIBS += [
     'static:js',
 ]
 
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
-
-if not CONFIG['GNU_CXX']:
-    ALLOW_COMPILER_WARNINGS = True
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -636,16 +636,18 @@ if CONFIG['_MSC_VER']:
     # pattern widely used in code in js/src, suppress this warning here.
     CXXFLAGS += ['-wd4805']
     # C4661 ("no suitable definition provided for explicit template
     # instantiation request") is emitted for all Parser methods that
     # have a Parser<FullParseHandler> definition but no
     # Parser<SyntaxParseHandler> definition, see bug 1167030.
     CXXFLAGS += ['-wd4661']
     CXXFLAGS += ['-we4067', '-we4258', '-we4275']
+    CXXFLAGS += ['-wd4146'] # FIXME: unary minus operator applied to unsigned type (bug 1229189)
+    CXXFLAGS += ['-wd4273'] # FIXME: inconsistent dll linkage (bug 1229666)
 
 if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
     OS_LIBS += [
         'm',
     ]
 
 if CONFIG['OS_ARCH'] == 'FreeBSD':
     OS_LIBS += [
@@ -664,19 +666,16 @@ if CONFIG['OS_ARCH'] == 'SunOS':
         'nsl',
         'socket',
     ]
 
 CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
-if not CONFIG['GNU_CXX']:
-    ALLOW_COMPILER_WARNINGS = True
-
 NO_EXPAND_LIBS = True
 
 DIST_INSTALL = True
 
 # Prepare self-hosted JS code for embedding
 GENERATED_FILES += ['selfhosted.out.h']
 selfhosted = GENERATED_FILES['selfhosted.out.h']
 selfhosted.script = 'builtin/embedjs.py:generate_selfhosted'
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -27,19 +27,16 @@ if CONFIG['_MSC_VER']:
 LOCAL_INCLUDES += [
     '!..',
     '..',
 ]
 
 OS_LIBS += CONFIG['EDITLINE_LIBS']
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
-if not CONFIG['GNU_CXX']:
-    ALLOW_COMPILER_WARNINGS = True
-
 # Prepare module loader JS code for embedding
 GENERATED_FILES += ['shellmoduleloader.out.h']
 shellmoduleloader = GENERATED_FILES['shellmoduleloader.out.h']
 shellmoduleloader.script = '../builtin/embedjs.py:generate_shellmoduleloader'
 shellmoduleloader.inputs = [
     '../js.msg',
     'ModuleLoader.js',
 ]