author Benjamin Bouvier <>
Fri, 08 Mar 2019 13:47:35 +0000
changeset 521154 ed3b55f9d32607b2f60156551c627a5b88930373
parent 511888 1e76cea31571ed9274acd577b515e2c928cd207b
permissions -rwxr-xr-x
Bug 1532689: Use Cranelift features to include only architecture-specific support; r=froydnj This introduces features in the jsrust crate, so we can enable/disable compilation for a specific platform at compile-time. It also does only select the architecture targeted by the JIT, which should result in slightly lower compilation times on every platform, and lower binary sizes too. Differential Revision:


set -v -e -x

if [ $# -lt 1 ]; then
  echo "Usage: /path/to/libjpeg-turbo/ [tag]"
  exit 1

srcdir=`realpath $(dirname $0)`
rm -rf $srcdir/libjpeg


(cd $repo; git archive --prefix=media/libjpeg/ $tag) | (cd $srcdir/..; tar xf -)

cd $srcdir/libjpeg
cp win/ simd/

revert_files="1050342.diff assembly-tables.diff externalize-table.diff 1520760-avx2-detection.diff jconfig.h jconfigint.h jpeg_nbits_table.c MOZCHANGES mozilla.diff simd/"
if test -d ${topsrcdir}/.hg; then
    hg revert --no-backup $revert_files
elif test -d ${topsrcdir}/.git; then
    git checkout HEAD -- $revert_files

patch -p0 -i mozilla.diff
patch -p0 -i 1050342.diff
patch -p3 -i externalize-table.diff
patch -p3 -i assembly-tables.diff
patch -p0 -i 1520760-avx2-detection.diff