# HG changeset patch
# Parent 78e058c75a38b70dd8fce19cdd30339a54dbba0b
try: -b o -e -p linux64 -u none -t none

diff --git a/browser/config/mozconfigs/linux32/debug b/browser/config/mozconfigs/linux32/debug
--- a/browser/config/mozconfigs/linux32/debug
+++ b/browser/config/mozconfigs/linux32/debug
@@ -1,24 +1,18 @@
+# Use at least -O1 for optimization to avoid stack space
+# exhaustions caused by Clang function inlining.
 ac_add_options --enable-debug
-ac_add_options --enable-trace-malloc
-ac_add_options --enable-signmar
-ENABLE_MARIONETTE=1
+ac_add_options --enable-optimize="-O1"
 
-. $topsrcdir/build/unix/mozconfig.linux
+# ASan specific options on Linux
+ac_add_options --enable-valgrind
+
+. $topsrcdir/build/unix/mozconfig.asan
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
-
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-#Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly
--- a/browser/config/mozconfigs/linux32/nightly
+++ b/browser/config/mozconfigs/linux32/nightly
@@ -1,38 +1,20 @@
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
-ac_add_options --enable-update-packaging
+# We still need to build with debug symbols
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O2 -g"
+
+# ASan specific options on Linux
+ac_add_options --enable-valgrind
+
+# Other options
 ac_add_options --enable-codesighs
-ac_add_options --enable-signmar
-ac_add_options --enable-profiling
 
-# Nightlies only since this has a cost in performance
-ac_add_options --enable-js-diagnostics
-
-. $topsrcdir/build/unix/mozconfig.linux
+. $topsrcdir/build/unix/mozconfig.asan
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
-# This will overwrite the default of stripping everything and keep the symbol table.
-# This is useful for profiling and debugging and only increases the package size
-# by 2 MBs.
-STRIP_FLAGS="--strip-debug"
-
-# PGO
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
-
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
-
-export MOZ_TELEMETRY_REPORTING=1
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-# Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
diff --git a/browser/config/mozconfigs/linux64/debug b/browser/config/mozconfigs/linux64/debug
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -1,24 +1,18 @@
+# Use at least -O1 for optimization to avoid stack space
+# exhaustions caused by Clang function inlining.
 ac_add_options --enable-debug
-ac_add_options --enable-trace-malloc
-ac_add_options --enable-signmar
-ENABLE_MARIONETTE=1
+ac_add_options --enable-optimize="-O1"
 
-. $topsrcdir/build/unix/mozconfig.linux
+# ASan specific options on Linux
+ac_add_options --enable-valgrind
+
+. $topsrcdir/build/unix/mozconfig.asan
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
-
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-# Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/nightly
@@ -1,38 +1,20 @@
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
-ac_add_options --enable-update-packaging
+# We still need to build with debug symbols
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O2 -g"
+
+# ASan specific options on Linux
+ac_add_options --enable-valgrind
+
+# Other options
 ac_add_options --enable-codesighs
-ac_add_options --enable-signmar
-ac_add_options --enable-profiling
 
-# Nightlies only since this has a cost in performance
-ac_add_options --enable-js-diagnostics
-
-. $topsrcdir/build/unix/mozconfig.linux
+. $topsrcdir/build/unix/mozconfig.asan
 
 # Avoid dependency on libstdc++ 4.5
 ac_add_options --enable-stdcxx-compat
 
-# This will overwrite the default of stripping everything and keep the symbol table.
-# This is useful for profiling and debugging and only increases the package size
-# by 2 MBs.
-STRIP_FLAGS="--strip-debug"
-
-# PGO
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
-
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
-
-export MOZ_TELEMETRY_REPORTING=1
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j4"
 
-# Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
diff --git a/browser/config/mozconfigs/macosx-universal/nightly b/browser/config/mozconfigs/macosx-universal/nightly
--- a/browser/config/mozconfigs/macosx-universal/nightly
+++ b/browser/config/mozconfigs/macosx-universal/nightly
@@ -1,29 +1,17 @@
-. $topsrcdir/build/macosx/universal/mozconfig
+. $topsrcdir/build/unix/mozconfig.asan
 
-# Universal builds override the default of browser (bug 575283 comment 29)
 ac_add_options --enable-application=browser
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O1 -g"
+ac_add_options --enable-accessibility
+ac_add_options --enable-trace-malloc
 
-ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
-ac_add_options --enable-update-packaging
-ac_add_options --enable-codesighs
-ac_add_options --disable-install-strip
-ac_add_options --enable-signmar
-ac_add_options --enable-profiling
-
-# Nightlies only since this has a cost in performance
-ac_add_options --enable-js-diagnostics
-
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
-
-export MOZ_TELEMETRY_REPORTING=1
+# Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j12"
 
-ac_add_options --with-macbundlename-prefix=Firefox
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-ac_add_options --with-ccache
+mk_add_options MOZ_BUILD_PROJECTS="x86_64"
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
+
+ac_add_options --with-macbundlename-prefix=Firefox
diff --git a/browser/config/mozconfigs/macosx-universal/nightly-asan b/browser/config/mozconfigs/macosx-universal/nightly-asan
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/macosx-universal/nightly-asan
@@ -0,0 +1,15 @@
+. $topsrcdir/build/unix/mozconfig.asan
+
+ac_add_options --enable-application=browser
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O1 -g"
+ac_add_options --enable-accessibility
+ac_add_options --enable-trace-malloc
+
+# Enable parallel compiling
+mk_add_options MOZ_MAKE_FLAGS="-j12"
+
+# Package js shell.
+export MOZ_PACKAGE_JSSHELL=1
+
+ac_add_options --with-macbundlename-prefix=Firefox
diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug
--- a/browser/config/mozconfigs/macosx64/debug
+++ b/browser/config/mozconfigs/macosx64/debug
@@ -1,22 +1,14 @@
-. $topsrcdir/build/macosx/common
+. $topsrcdir/build/unix/mozconfig.asan
 
+ac_add_options --enable-application=browser
 ac_add_options --enable-debug
-ac_add_options --enable-trace-malloc
+ac_add_options --enable-optimize="-O1"
 ac_add_options --enable-accessibility
-ac_add_options --enable-signmar
-ENABLE_MARIONETTE=1
 
 # Enable parallel compiling
 mk_add_options MOZ_MAKE_FLAGS="-j12"
 
-# Needed to enable breakpad in application.ini
-export MOZILLA_OFFICIAL=1
+# Package js shell.
+export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-macbundlename-prefix=Firefox
-
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-ac_add_options --with-ccache
-
-# Package js shell.
-export MOZ_PACKAGE_JSSHELL=1
diff --git a/browser/config/mozconfigs/macosx64/debug-asan b/browser/config/mozconfigs/macosx64/debug-asan
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/macosx64/debug-asan
@@ -0,0 +1,14 @@
+. $topsrcdir/build/unix/mozconfig.asan
+
+ac_add_options --enable-application=browser
+ac_add_options --enable-debug
+ac_add_options --enable-optimize="-O1"
+ac_add_options --enable-accessibility
+
+# Enable parallel compiling
+mk_add_options MOZ_MAKE_FLAGS="-j12"
+
+# Package js shell.
+export MOZ_PACKAGE_JSSHELL=1
+
+ac_add_options --with-macbundlename-prefix=Firefox
diff --git a/browser/config/tooltool-manifests/linux64/releng.manifest b/browser/config/tooltool-manifests/linux64/releng.manifest
--- a/browser/config/tooltool-manifests/linux64/releng.manifest
+++ b/browser/config/tooltool-manifests/linux64/releng.manifest
@@ -1,1 +1,15 @@
-[]
+[
+{"clang_version": "r159509"},
+{
+"size": 47,
+"digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa",
+"algorithm": "sha512",
+"filename": "setup.sh"
+},
+{
+"size": 72518043,
+"digest": "447dac319a8d7fa902cc065b758440bf6d4a7a98104362162fbdb0479a44d9b84c5878506f09be4398053a6ddc07935c7fb4f71e59b178073876fb5f90a45219",
+"algorithm": "sha512",
+"filename": "clang.tar.bz2"
+}
+]
diff --git a/browser/config/tooltool-manifests/macosx64/releng.manifest b/browser/config/tooltool-manifests/macosx64/releng.manifest
--- a/browser/config/tooltool-manifests/macosx64/releng.manifest
+++ b/browser/config/tooltool-manifests/macosx64/releng.manifest
@@ -1,1 +1,15 @@
-[]
+[
+{"clang_version": "r159509"},
+{
+"size": 47,
+"digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa",
+"algorithm": "sha512",
+"filename": "setup.sh"
+},
+{
+"size": 63679229,
+"digest": "5257503e537b8d440b17e40aa06f0f70f1b124129c02f10e45b46ac642fc4170bfa77ae737a8bcac3ed7602ccd934a88cbe349986eb971d66a6fb553ae31f13c",
+"algorithm": "sha512",
+"filename": "clang.tar.bz2"
+}
+]
