Bug 646702 - Add an --enable-sm-fail-on-warnings configure option to make it easier to do Tinderbox SpiderMonkey shell builds that fail on warnings, r=pbiggar
authorPhil Ringnalda <philringnalda@gmail.com>
Wed, 06 Apr 2011 03:52:28 -0700
changeset 67919 d030c439c7cb5e983c2b4a2b962d1dcaa6d93cd3
parent 67918 408c30d4a038cf8b221556f73efff5e5e1967c50
child 67920 5170b2b6bc72896b82327eaa0e33753138f3c794
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbiggar
bugs646702
milestone2.2a1pre
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 646702 - Add an --enable-sm-fail-on-warnings configure option to make it easier to do Tinderbox SpiderMonkey shell builds that fail on warnings, r=pbiggar
js/src/Makefile.in
js/src/config/autoconf.mk.in
js/src/configure.in
js/src/shell/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -83,17 +83,16 @@ ifdef INTEL_CXX
 # icc gets special optimize flags
 ifdef MOZ_PROFILE_GENERATE
 MODULE_OPTIMIZE_FLAGS = -O0
 else
 MODULE_OPTIMIZE_FLAGS = -O2 -ip
 endif
 else # not INTEL_CXX
 
-#FAIL_ON_WARNINGS = 1
 MODULE_OPTIMIZE_FLAGS = -O3 -fstrict-aliasing -fno-stack-protector
 
 # We normally want -fomit-frame-pointer, but we want an explicit
 # -fno-omit-frame-pointer if we're using a sampling profiler.
 ifndef MOZ_PROFILING
 MODULE_OPTIMIZE_FLAGS += -fomit-frame-pointer
 else
 MODULE_OPTIMIZE_FLAGS += -fno-omit-frame-pointer
--- a/js/src/config/autoconf.mk.in
+++ b/js/src/config/autoconf.mk.in
@@ -137,16 +137,17 @@ OS_LDFLAGS	= @LDFLAGS@
 OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@
 OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@
 
 OS_INCLUDES	= $(NSPR_CFLAGS)
 OS_LIBS		= @LIBS@
 ACDEFINES	= @MOZ_DEFINES@
 
 WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@
+FAIL_ON_WARNINGS = @FAIL_ON_WARNINGS@
 
 MOZ_OPTIMIZE	= @MOZ_OPTIMIZE@
 MOZ_OPTIMIZE_FLAGS = @MOZ_OPTIMIZE_FLAGS@
 MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@
 MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@
 
 MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@
 MOZ_EXCEPTIONS_FLAGS_ON = @_MOZ_EXCEPTIONS_FLAGS_ON@
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -4774,16 +4774,27 @@ MOZ_ARG_DISABLE_BOOL(warnings-as-errors,
 [  --disable-warnings-as-errors
                           Disable treating of warnings as errors],
     MOZ_DISABLE_WARNINGS_AS_ERRORS=1,
     MOZ_DISABLE_WARNINGS_AS_ERRORS= )
 if test "$MOZ_DISABLE_WARNINGS_AS_ERRORS"; then
    WARNINGS_AS_ERRORS=''
 fi
 
+dnl ========================================================
+dnl = Enable treating compile warnings as errors
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(sm-fail-on-warnings,
+[  --enable-sm-fail-on-warnings
+                          Enable warnings as errors],
+    FAIL_ON_WARNINGS=1,
+    FAIL_ON_WARNINGS= )
+
+AC_SUBST(FAIL_ON_WARNINGS)
+
 dnl = Enable trace malloc
 dnl ========================================================
 NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
 MOZ_ARG_ENABLE_BOOL(trace-malloc,
 [  --enable-trace-malloc   Enable malloc tracing],
     NS_TRACE_MALLOC=1,
     NS_TRACE_MALLOC= )
 if test "$NS_TRACE_MALLOC"; then
--- a/js/src/shell/Makefile.in
+++ b/js/src/shell/Makefile.in
@@ -51,18 +51,16 @@ CPPSRCS		= \
   $(NULL)
 
 DEFINES         += -DEXPORT_JS_API
 
 LIBS      = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX)
 
 LOCAL_INCLUDES += -I$(topsrcdir) -I..
 
-#FAIL_ON_WARNINGS = 1
-
 ifdef _MSC_VER
 ifdef WINCE
 WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
 endif
 endif
 
 ifeq ($(OS_ARCH),Darwin)
 ifeq ($(TARGET_CPU),x86_64)