зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset f9cf33c52739 (bug 1498715) on request by nalexander for local developer failures. a=backout
This commit is contained in:
Родитель
6c966e4d3a
Коммит
7460807a56
|
@ -128,8 +128,6 @@ def xz_compress(path):
|
|||
'''
|
||||
Execute xz to compress the given path.
|
||||
'''
|
||||
path = os.path.abspath(path)
|
||||
|
||||
if open(path, 'rb').read(5)[1:] == '7zXZ':
|
||||
print('%s is already compressed' % path)
|
||||
return
|
||||
|
@ -157,28 +155,15 @@ def xz_compress(path):
|
|||
|
||||
# We need to explicitly specify the LZMA filter chain to ensure consistent builds
|
||||
# across platforms. Note that the dict size must be less then 16MiB per the hardcoded
|
||||
# value in mozglue/linker/XZStream.cpp. See:
|
||||
# value in mozglue/linker/XZStream.cpp. This is the default LZMA filter chain for for
|
||||
# xz-utils version 5.0. See:
|
||||
# https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/lzma/lzma_encoder_presets.c
|
||||
# https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/api/lzma/container.h#L31
|
||||
|
||||
if not substs.get('DEVELOPER_OPTIONS'):
|
||||
# This is the default LZMA filter chain for for xz-utils version 5.0. See:
|
||||
cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0'])
|
||||
else:
|
||||
# This is the filter chain for level=3, which is the highest
|
||||
# compression fast preset.
|
||||
cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=fast,nice=273,mf=hc4,depth=24'])
|
||||
|
||||
print('xz-compressing %s with "%s"...' % (path, ' '.join(cmd)))
|
||||
|
||||
import time
|
||||
t0 = time.time()
|
||||
cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0'])
|
||||
print('xz-compressing %s with %s' % (path, ' '.join(cmd)))
|
||||
|
||||
if subprocess.call(cmd) != 0:
|
||||
errors.fatal('Error executing ' + ' '.join(cmd))
|
||||
return
|
||||
|
||||
elapsed = time.time() - t0
|
||||
print('xz-compressing %s with "%s"... DONE (%.2fs)' % (path, ' '.join(cmd), elapsed))
|
||||
|
||||
os.rename(path + '.xz', path)
|
||||
|
|
Загрузка…
Ссылка в новой задаче