summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--old-configure.in16
-rw-r--r--toolkit/mozapps/installer/packager.py19
2 files changed, 26 insertions, 9 deletions
diff --git a/old-configure.in b/old-configure.in
index 13f6915b4..120abdf8a 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -4340,6 +4340,22 @@ MOZ_ARG_ENABLE_BOOL(debug-js-modules,
AC_SUBST(DEBUG_JS_MODULES)
dnl ========================================================
+dnl = Don't precompile the startup cache
+dnl ========================================================
+MOZ_DISABLE_PRECOMPILED_STARTUPCACHE=
+
+MOZ_ARG_DISABLE_BOOL(precompiled-startupcache,
+[ --disable-precompiled-startupcache Don't precompile the startup cache ],
+ MOZ_DISABLE_PRECOMPILED_STARTUPCACHE=1,
+ MOZ_DISABLE_PRECOMPILED_STARTUPCACHE= )
+
+if test -n "$MOZ_DISABLE_PRECOMPILED_STARTUPCACHE"; then
+ AC_DEFINE(MOZ_DISABLE_PRECOMPILED_STARTUPCACHE)
+fi
+
+AC_SUBST(MOZ_DISABLE_PRECOMPILED_STARTUPCACHE)
+
+dnl ========================================================
dnl =
dnl = Profiling and Instrumenting
dnl =
diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py
index f2dc3fac6..40f31646a 100644
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -156,15 +156,16 @@ def precompile_cache(registry, source_path, gre_path, app_path):
extra_env['TSAN_OPTIONS'] = 'report_bugs=0'
if buildconfig.substs.get('MOZ_ASAN'):
extra_env['ASAN_OPTIONS'] = 'detect_leaks=0'
- if launcher.launch(['xpcshell', '-g', gre_path, '-a', app_path,
- '-f', os.path.join(os.path.dirname(__file__),
- 'precompile_cache.js'),
- '-e', 'precompile_startupcache("resource://%s/");'
- % resource],
- extra_linker_path=gre_path,
- extra_env=extra_env):
- errors.fatal('Error while running startup cache precompilation')
- return
+ if buildconfig.substs.get('MOZ_DISABLE_PRECOMPILED_STARTUPCACHE') != '1':
+ if launcher.launch(['xpcshell', '-g', gre_path, '-a', app_path,
+ '-f', os.path.join(os.path.dirname(__file__),
+ 'precompile_cache.js'),
+ '-e', 'precompile_startupcache("resource://%s/");'
+ % resource],
+ extra_linker_path=gre_path,
+ extra_env=extra_env):
+ errors.fatal('Error while running startup cache precompilation')
+ return
from mozpack.mozjar import JarReader
jar = JarReader(cache)
resource = '/resource/%s/' % resource