Bug 1315512 - Fix XZ library decompression on x86. r=esawin
authorNick Alexander <nalexander@mozilla.com>
Mon, 07 Nov 2016 20:04:24 -0800
changeset 321609 b2721e0ef0ef0fc3398e02d80293321bcd3ebe8f
parent 321608 e577673efe22f98618789a3ed2e0f0b83817fca4
child 321610 4a38ccb01816b597f7aee44f6895fd4d00b2f01f
push id30931
push userkwierso@gmail.com
push dateTue, 08 Nov 2016 21:58:36 +0000
treeherdermozilla-central@783356f1476e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin
bugs1315512
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1315512 - Fix XZ library decompression on x86. r=esawin MozReview-Commit-ID: 6mp3ABRi2gZ
modules/xz-embedded/moz.build
--- a/modules/xz-embedded/moz.build
+++ b/modules/xz-embedded/moz.build
@@ -13,19 +13,21 @@ UNIFIED_SOURCES += [
     'src/xz_crc64.c',
     'src/xz_dec_bcj.c',
     'src/xz_dec_lzma2.c',
     'src/xz_dec_stream.c',
 ]
 
 ALLOW_COMPILER_WARNINGS = True
 
-if CONFIG['TARGET_CPU'] == 'arm':
+if CONFIG['TARGET_CPU'].startswith('arm'):
+    # Accept arm, armv7, etc.
     if CONFIG['MOZ_THUMB2']:
         DEFINES['XZ_DEC_ARMTHUMB'] = 1
     else:
         DEFINES['XZ_DEC_ARM'] = 1
-elif CONFIG['TARGET_CPU'] == 'x86':
+elif '86' in CONFIG['TARGET_CPU']:
+    # Accept x86, x86_64, i386, i686, etc.
     DEFINES['XZ_DEC_X86'] = 1
 
 DEFINES['XZ_USE_CRC64'] = 1
 
 Library('xz-embedded')