summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-01 13:21:30 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-01 13:21:30 +0200
commit1df0753239bf14e4918c5de3b24d12dd157980e5 (patch)
tree899ada7b0b1f70e65a0a9b9a7f345d5c0758311b /toolkit
parent2e20a40d3725d9a714582252c9ef461e68b8298e (diff)
downloaduxp-1df0753239bf14e4918c5de3b24d12dd157980e5.tar.gz
Add build config option to disable startup cache precompilation.
This resolves #418.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/mozapps/installer/packager.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py
index f2dc3fac66..40f31646ad 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