Bug 904979 - Add build option for rel-eng type builds. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 Aug 2013 23:45:09 +0900
changeset 150763 543772de681ee33182817f560050e58757475b9f
parent 150762 0542d2080a0400f4f5110549943cc49f1d76c234
child 150764 6f24ebad0ad8287dc80fe805a91f03932d0ce8f2
push idunknown
push userunknown
push dateunknown
reviewersted
bugs904979
milestone26.0a1
Bug 904979 - Add build option for rel-eng type builds. r=ted
build/autoconf/compiler-opts.m4
build/mozconfig.common
js/src/build/autoconf/compiler-opts.m4
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -76,16 +76,28 @@ if test -z "$_MOZ_USE_RTTI"; then
         esac
     fi
 fi
 ])
 
 dnl A high level macro for selecting compiler options.
 AC_DEFUN([MOZ_COMPILER_OPTS],
 [
+  DEVELOPER_OPTIONS=1
+  MOZ_ARG_ENABLE_BOOL(release,
+  [  --enable-release        Build with more conservative, release engineering-oriented options.
+                          This may slow down builds.],
+      DEVELOPER_OPTIONS=)
+
+  if test -n "$MOZILLA_OFFICIAL" -a -n "$DEVELOPER_OPTIONS"; then
+    AC_MSG_ERROR([You cannot set MOZILLA_OFFICIAL without --enable-release])
+  fi
+  AC_SUBST(DEVELOPER_OPTIONS)
+
+  MOZ_DEBUGGING_OPTS
   MOZ_RTTI
 if test "$CLANG_CXX"; then
     ## We disable return-type-c-linkage because jsval is defined as a C++ type but is
     ## returned by C functions. This is possible because we use knowledge about the ABI
     ## to typedef it to a C type with the same layout when the headers are included
     ## from C.
     ##
     ## mismatched-tags is disabled (bug 780474) mostly because it's useless.
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -1,15 +1,17 @@
 # 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/.
 
-# Common mozconfig for all users
+# Common mozconfig for official builds.
 #
 # Add options to this file that will be inherited by all in-tree mozconfigs.
 # This is useful for eg try builds with nondefault options that apply to all
 # architectures, though note that if you want to override options set in
 # another mozconfig file, you'll need to use mozconfig.common.override instead
 # of this file.
 
 mk_add_options AUTOCLOBBER=1
 
 ac_add_options --enable-crashreporter
+
+ac_add_options --enable-release
--- a/js/src/build/autoconf/compiler-opts.m4
+++ b/js/src/build/autoconf/compiler-opts.m4
@@ -76,16 +76,28 @@ if test -z "$_MOZ_USE_RTTI"; then
         esac
     fi
 fi
 ])
 
 dnl A high level macro for selecting compiler options.
 AC_DEFUN([MOZ_COMPILER_OPTS],
 [
+  DEVELOPER_OPTIONS=1
+  MOZ_ARG_ENABLE_BOOL(release,
+  [  --enable-release        Build with more conservative, release engineering-oriented options.
+                          This may slow down builds.],
+      DEVELOPER_OPTIONS=)
+
+  if test -n "$MOZILLA_OFFICIAL" -a -n "$DEVELOPER_OPTIONS"; then
+    AC_MSG_ERROR([You cannot set MOZILLA_OFFICIAL without --enable-release])
+  fi
+  AC_SUBST(DEVELOPER_OPTIONS)
+
+  MOZ_DEBUGGING_OPTS
   MOZ_RTTI
 if test "$CLANG_CXX"; then
     ## We disable return-type-c-linkage because jsval is defined as a C++ type but is
     ## returned by C functions. This is possible because we use knowledge about the ABI
     ## to typedef it to a C type with the same layout when the headers are included
     ## from C.
     ##
     ## mismatched-tags is disabled (bug 780474) mostly because it's useless.