bug 1248020 - convert a bunch of moz.build files to use USE_YASM. r=mshal
authorTed Mielczarek <ted@mielczarek.org>
Thu, 03 Mar 2016 11:38:59 -0500
changeset 288543 116882b45609d0ceac5cb80fe71c04889e6ec187
parent 288542 f8278f56b336fd0d859db8cabdce102f63f7a3b3
child 288544 ec1879bdc5dc04d4a810c5177be94eb9b3218b9b
push id73447
push usertmielczarek@mozilla.com
push dateMon, 14 Mar 2016 13:48:07 +0000
treeherdermozilla-inbound@ec1879bdc5dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1248020
milestone48.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 1248020 - convert a bunch of moz.build files to use USE_YASM. r=mshal MozReview-Commit-ID: n59TejhJq6
config/config.mk
media/ffvpx/ffvpxcommon.mozbuild
media/ffvpx/libavcodec/moz.build
media/ffvpx/libavcodec/x86/Makefile.in
media/ffvpx/libavutil/moz.build
media/ffvpx/libavutil/x86/Makefile.in
media/libav/Makefile.in
media/libav/libavcommon.mozbuild
media/libav/libavutil/x86/Makefile.in
media/libjpeg/Makefile.in
media/libjpeg/moz.build
media/libvpx/Makefile.in
media/libvpx/moz.build
old-configure.in
--- a/config/config.mk
+++ b/config/config.mk
@@ -148,24 +148,17 @@ ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS)
     endif
   else
     _DEBUG_ASFLAGS += $(MOZ_DEBUG_FLAGS)
   endif
   _DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
   _DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
 endif
 
-ifeq ($(YASM),$(AS))
-# yasm doesn't like the GNU as flags we may already have in ASFLAGS, so reset.
-ASFLAGS := $(_DEBUG_ASFLAGS)
-# yasm doesn't like -c
-AS_DASH_C_FLAG=
-else
 ASFLAGS += $(_DEBUG_ASFLAGS)
-endif
 OS_CFLAGS += $(_DEBUG_CFLAGS)
 OS_CXXFLAGS += $(_DEBUG_CFLAGS)
 OS_LDFLAGS += $(_DEBUG_LDFLAGS)
 
 # XXX: What does this? Bug 482434 filed for better explanation.
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 ifndef MOZ_DEBUG
 
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -3,17 +3,18 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Add assembler flags and includes
 ASFLAGS += CONFIG['FFVPX_ASFLAGS']
 ASFLAGS += ['-I%s/media/ffvpx' % TOPSRCDIR]
 
-if CONFIG['FFVPX_AS']:
+if CONFIG['FFVPX_ASFLAGS']:
+    USE_YASM = True
     if CONFIG['OS_ARCH'] == 'WINNT':
        # Fix inline symbols and math defines for windows.
         DEFINES['_USE_MATH_DEFINES'] = True
         DEFINES['inline'] = "__inline"
         # 32-bit windows need to prefix symbols with an underscore.
         if CONFIG['CPU_ARCH'] == 'x86':
             ASFLAGS += ['-DPREFIX']
             ASFLAGS += ['-Pconfig_win32.asm']
--- a/media/ffvpx/libavcodec/moz.build
+++ b/media/ffvpx/libavcodec/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Due to duplicate file names, we compile libavutil/x86 in its own
 # moz.build file.
-if CONFIG['FFVPX_AS']:
+if CONFIG['FFVPX_ASFLAGS']:
     DIRS += ['x86']
 
 SharedLibrary('mozavcodec')
 SOURCES += [
     'allcodecs.c',
     'audioconvert.c',
     'avdct.c',
     'avpacket.c',
deleted file mode 100644
--- a/media/ffvpx/libavcodec/x86/Makefile.in
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-AS=$(FFVPX_AS)
-
--- a/media/ffvpx/libavutil/moz.build
+++ b/media/ffvpx/libavutil/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Due to duplicate file names, we compile libavutil/x86 in its own
 # moz.build file.
-if CONFIG['FFVPX_AS']:
+if CONFIG['FFVPX_ASFLAGS']:
     DIRS += ['x86']
 
 SharedLibrary('mozavutil')
 SOURCES += [
     'adler32.c',
     'atomic.c',
     'avstring.c',
     'base64.c',
deleted file mode 100644
--- a/media/ffvpx/libavutil/x86/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-AS=$(FFVPX_AS)
deleted file mode 100644
--- a/media/libav/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-AS=$(LIBAV_FFT_AS)
--- a/media/libav/libavcommon.mozbuild
+++ b/media/libav/libavcommon.mozbuild
@@ -1,17 +1,19 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Add assembler flags and includes
-ASFLAGS += CONFIG['LIBAV_FFT_ASFLAGS']
-ASFLAGS += ['-I%s/media/libav' % TOPSRCDIR]
+if CONFIG['LIBAV_FFT_ASFLAGS']:
+    ASFLAGS += CONFIG['LIBAV_FFT_ASFLAGS']
+    ASFLAGS += ['-I%s/media/libav' % TOPSRCDIR]
+    USE_YASM = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     # Fix inline symbols and math defines for windows.
     DEFINES['_USE_MATH_DEFINES'] = True
     DEFINES['inline'] = "__inline"
     if CONFIG['_MSC_VER'] and CONFIG['_MSC_VER'] < '1900':
         # snprintf is prefixed with an underscore on MSVC 2013.
         DEFINES['snprintf'] = "_snprintf"
deleted file mode 100644
--- a/media/libav/libavutil/x86/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-AS=$(LIBAV_FFT_AS)
deleted file mode 100644
--- a/media/libjpeg/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-AS=$(LIBJPEG_TURBO_AS)
-
-include $(topsrcdir)/config/rules.mk
-
--- a/media/libjpeg/moz.build
+++ b/media/libjpeg/moz.build
@@ -61,17 +61,20 @@ SOURCES += [
     'jcmaster.c',
     'jcparam.c',
     'jcphuff.c',
     'jcprepct.c',
     'jcsample.c',
     'jctrans.c',
 ]
 
-if CONFIG['LIBJPEG_TURBO_AS']:
+if CONFIG['LIBJPEG_TURBO_USE_YASM']:
+    USE_YASM = True
+
+if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
     if CONFIG['CPU_ARCH'] == 'arm':
         SOURCES += [
             'simd/jsimd_arm.c',
             'simd/jsimd_arm_neon.S',
         ]
     elif CONFIG['CPU_ARCH'] == 'aarch64':
         SOURCES += [
             'simd/jsimd_arm64.c',
--- a/media/libvpx/Makefile.in
+++ b/media/libvpx/Makefile.in
@@ -1,16 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Set up the libvpx assembler config.
 
-AS=$(VPX_AS)
-
 ifdef VPX_ARM_ASM
 
 ifdef VPX_AS_CONVERSION
 # The ARM asm is written in ARM RVCT syntax, but we actually build it with
 # gas using GNU syntax. Add some rules to perform the conversion.
 
 GENERATED_DIRS += $(dir $(ASFILES))
 
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -11,16 +11,19 @@ include('sources.mozbuild')
 
 EXPORTS.vpx += files['EXPORTS']
 
 SOURCES += files['SOURCES']
 
 if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
     SOURCES += files['ERROR_CONCEALMENT']
 
+if CONFIG['VPX_USE_YASM']:
+    USE_YASM = True
+
 if CONFIG['VPX_X86_ASM']:
     SOURCES += files['X86_ASM']
 
     if '64' in CONFIG['OS_TEST']:
         SOURCES += files['X86-64_ASM']
 
     #avx2 can be enabled on all supported compilters
     SOURCES += files['AVX2']
--- a/old-configure.in
+++ b/old-configure.in
@@ -3591,17 +3591,17 @@ MOZ_ANDROID_OMX=
 MOZ_MEDIA_NAVIGATOR=
 MOZ_OMX_PLUGIN=
 MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE=
 MOZ_VPX_ERROR_CONCEALMENT=
 MOZ_WEBSPEECH=1
 MOZ_WEBSPEECH_MODELS=
 MOZ_WEBSPEECH_POCKETSPHINX=
 MOZ_WEBSPEECH_TEST_BACKEND=1
-VPX_AS=
+VPX_USE_YASM=
 VPX_ASFLAGS=
 VPX_AS_CONVERSION=
 VPX_X86_ASM=
 VPX_ARM_ASM=
 LIBJPEG_TURBO_AS=
 LIBJPEG_TURBO_ASFLAGS=
 MOZ_PERMISSIONS=1
 MOZ_PLACES=1
@@ -5263,48 +5263,46 @@ else
     MOZ_TREMOR=1
 fi
 
 if test -z "$MOZ_NATIVE_LIBVPX"; then
 
     dnl Detect if we can use an assembler to compile optimized assembly for libvpx.
     dnl We currently require yasm on all x86 platforms and require yasm 1.1.0 on Win32.
     dnl We currently require gcc on all arm platforms.
-    VPX_AS=$YASM
     VPX_NEED_OBJ_INT_EXTRACT=
 
     dnl See if we have assembly on this platform.
     case "$OS_ARCH:$CPU_ARCH" in
     Darwin:x86)
-      VPX_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC"
+      VPX_USE_YASM=1
       VPX_X86_ASM=1
     ;;
     Darwin:x86_64)
-      VPX_ASFLAGS="-f macho64 -rnasm -pnasm -DPIC"
+      VPX_USE_YASM=1
       VPX_X86_ASM=1
     ;;
     WINNT:x86_64)
-      VPX_ASFLAGS="-f x64 -rnasm -pnasm"
+      VPX_USE_YASM=1
       VPX_X86_ASM=1
     ;;
     WINNT:x86)
       dnl Check for yasm 1.1 or greater.
       if test -n "$COMPILE_ENVIRONMENT" -a -z "$YASM"; then
         AC_MSG_ERROR([yasm 1.1 or greater is required to build libvpx on Win32, but it appears not to be installed.  Install it (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details.])
       elif test -n "$COMPILE_ENVIRONMENT" -a "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
         AC_MSG_ERROR([yasm 1.1 or greater is required to build libvpx on Win32, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details.])
       else
-        VPX_ASFLAGS="-f win32 -rnasm -pnasm -DPIC"
+        VPX_USE_YASM=1
         VPX_X86_ASM=1
         dnl The encoder needs obj_int_extract to get asm offsets.
       fi # COMPILE_ENVIRONMENT and others
     ;;
     *:arm*)
       if test -n "$GNU_AS" ; then
-        VPX_AS=$AS
         dnl These flags are a lie; they're just used to enable the requisite
         dnl opcodes; actual arch detection is done at runtime.
         VPX_ASFLAGS="-march=armv7-a -mfpu=neon"
         VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/build/make/ads2gas.pl'
         VPX_ARM_ASM=1
         dnl Building with -mfpu=neon requires either the "softfp" or the
         dnl "hardfp" ABI. Depending on the compiler's default target, and the
         dnl CFLAGS, the default ABI might be neither, in which case it is the
@@ -5321,32 +5319,36 @@ if test -z "$MOZ_NATIVE_LIBVPX"; then
            #error "compiler target supports -mfpu=neon, so we don't have to add extra flags"
            #endif],
            VPX_ASFLAGS="$VPX_ASFLAGS -mfloat-abi=softfp"
            )
       fi
     ;;
     *:x86)
       if $CC -E -dM -</dev/null | grep -q __ELF__; then
-        VPX_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC"
+        VPX_USE_YASM=1
         VPX_X86_ASM=1
       fi
     ;;
     *:x86_64)
       if $CC -E -dM -</dev/null | grep -q __ELF__; then
-        VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
+        VPX_USE_YASM=1
         VPX_X86_ASM=1
       fi
     ;;
     esac
 
-    if test -n "$COMPILE_ENVIRONMENT" -a -n "$VPX_X86_ASM" -a -z "$VPX_AS"; then
+    if test -n "$COMPILE_ENVIRONMENT" -a -n "$VPX_USE_YASM" -a -z "$YASM"; then
       AC_MSG_ERROR([yasm is a required build tool for this architecture when webm is enabled. You may either install yasm or --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details.])
     fi # COMPILE_ENVIRONMENT and others
 
+    if test -n "$VPX_USE_YASM" && test "$OS_ARCH:$CPU_ARCH" != "WINNT:x86_64"; then
+      VPX_ASFLAGS="-DPIC"
+    fi
+
     if test -z "$GNU_CC" -a -z "$INTEL_CC" -a -z "$CLANG_CC" ; then
       dnl We prefer to get asm offsets using inline assembler, which the above
       dnl compilers can do. When we're not using one of those, we have to fall
       dnl back to obj_int_extract, which reads them from a compiled object
       dnl file. Unfortunately, that only works if we're compiling on a system
       dnl with the header files for the appropriate object file format.
       VPX_NEED_OBJ_INT_EXTRACT=1
     fi
@@ -5875,16 +5877,17 @@ if test -z "$MOZ_CRASHREPORTER_ENABLE_PE
    MOZ_CRASHREPORTER_ENABLE_PERCENT=100
 fi
 AC_DEFINE_UNQUOTED(MOZ_CRASHREPORTER_ENABLE_PERCENT, $MOZ_CRASHREPORTER_ENABLE_PERCENT)
 
 dnl ========================================================
 dnl = libjpeg-turbo configuration
 dnl ========================================================
 MOZ_LIBJPEG_TURBO=
+LIBJPEG_TURBO_USE_YASM=
 if test -z "$MOZ_NATIVE_JPEG"; then
     MOZ_LIBJPEG_TURBO=1
 fi
 
 MOZ_ARG_DISABLE_BOOL(libjpeg_turbo,
 [ --disable-libjpeg-turbo  Disable optimized jpeg decoding routines],
     MOZ_LIBJPEG_TURBO=,
     MOZ_LIBJPEG_TURBO=1)
@@ -5896,84 +5899,76 @@ fi
 dnl Detect if we can use yasm to compile libjpeg-turbo's optimized assembly
 dnl files.
 
 if test -n "$MOZ_LIBJPEG_TURBO"; then
 
   dnl Do we support libjpeg-turbo on this platform?
   case "$OS_ARCH:$CPU_ARCH" in
   Darwin:x86)
-    LIBJPEG_TURBO_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC -DMACHO"
+    LIBJPEG_TURBO_ASFLAGS="-DPIC -DMACHO"
   ;;
   Darwin:x86_64)
-    LIBJPEG_TURBO_ASFLAGS="-f macho64 -rnasm -pnasm -D__x86_64__ -DPIC -DMACHO"
+    LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
   ;;
   Darwin:arm*)
   ;;
   WINNT:x86)
-    LIBJPEG_TURBO_ASFLAGS="-f win32 -rnasm -pnasm -DPIC -DWIN32"
+    LIBJPEG_TURBO_ASFLAGS="-DPIC -DWIN32"
   ;;
   WINNT:x86_64)
-    LIBJPEG_TURBO_ASFLAGS="-f win64 -rnasm -pnasm -D__x86_64__ -DPIC -DWIN64 -DMSVC"
+    LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DWIN64 -DMSVC"
   ;;
   *:arm)
     LIBJPEG_TURBO_ASFLAGS="-march=armv7-a -mfpu=neon"
   ;;
   *:aarch64)
     LIBJPEG_TURBO_ASFLAGS="-march=armv8-a"
   ;;
   *:mips)
     LIBJPEG_TURBO_ASFLAGS="-mdspr2"
   ;;
   *:x86)
     if $CC -E -dM -</dev/null | grep -q __ELF__; then
-      LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
+      LIBJPEG_TURBO_ASFLAGS="-DPIC -DELF"
     fi
   ;;
   *:x86_64)
     if $CC -E -dM -</dev/null | grep -q __ELF__; then
-      LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
+      LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DELF"
     fi
   ;;
   esac
 fi
 
 if test -n "$LIBJPEG_TURBO_ASFLAGS"; then
   case "$CPU_ARCH" in
 dnl If we're on an x86 or x64 system which supports libjpeg-turbo's asm routines
 dnl and --disable-libjpeg-turbo wasn't passed, check for Yasm, and error out if
 dnl it doesn't exist or we have too old of a version.
   x86_64|x86)
-    LIBJPEG_TURBO_AS=$YASM
-
-    if test -z "$LIBJPEG_TURBO_AS" ; then
+    LIBJPEG_TURBO_USE_YASM=1
+
+    if test -z "$YASM" ; then
         AC_MSG_ERROR([Yasm is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you do not appear to have Yasm installed.  Either install it or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
     fi
 
     dnl Check that we have the right yasm version.  We require 1.0.1 or newer
     dnl on Linux and 1.1 or newer everywhere else.
     if test "$OS_ARCH" = "Linux" ; then
         if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -eq "0" -a "$_YASM_RELEASE" -lt "1" \) ; then
             AC_MSG_ERROR([Yasm 1.0.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.$_YASM_RELEASE.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
         fi
     else
         if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
             AC_MSG_ERROR([Yasm 1.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
         fi
     fi
   ;;
-dnl On other platforms, use the C compiler as the assembler.
-  *)
-    LIBJPEG_TURBO_AS=$AS
-  ;;
   esac
-elif test -n "$MOZ_LIBJPEG_TURBO"; then
-    dnl Warn if we're not building the optimized routines, even though the user
-    dnl didn't specify --disable-libjpeg-turbo.
-    AC_MSG_WARN([No assembler or assembly support for libjpeg-turbo.  Using unoptimized C routines.])
 fi
 
 dnl ========================================================
 dnl = libav-fft configuration
 dnl ========================================================
 
 MOZ_LIBAV_FFT=
 
@@ -5991,41 +5986,40 @@ esac
 
 dnl Detect if we can use yasm to compile libav's assembly
 
 if test -n "$MOZ_LIBAV_FFT"; then
   AC_DEFINE(MOZ_LIBAV_FFT)
   dnl Do we support libav-fft on this platform?
   case "$OS_ARCH:$CPU_ARCH" in
   Darwin:x86_64)
-    LIBAV_FFT_ASFLAGS="-f macho64 -rnasm -pnasm -D__x86_64__ -DPIC -DMACHO"
+    LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
   ;;
   WINNT:x86)
-    LIBAV_FFT_ASFLAGS="-f win32 -rnasm -pnasm -DPIC -DWIN32"
+    LIBAV_FFT_ASFLAGS="-DPIC -DWIN32"
   ;;
   WINNT:x86_64)
-    LIBAV_FFT_ASFLAGS="-f win64 -rnasm -pnasm -D__x86_64__ -DPIC -DWIN64 -DMSVC"
+    LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DWIN64 -DMSVC"
   ;;
   *:x86_64)
     if $CC -E -dM -</dev/null | grep -q __ELF__; then
-      LIBAV_FFT_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
+      LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DELF"
     fi
   ;;
   *)
     AC_MSG_ERROR([libav's FFT routines are only available for 32-bit windows or 64-bit x86 based platforms.])
   ;;
   esac
 fi
 
 if test -n "$LIBAV_FFT_ASFLAGS"; then
   dnl If we're on an x86 or x64 system which supports libav-fft's asm routines
   dnl check for Yasm, and error out if it doesn't exist or we have too old of a
   dnl version.
-  LIBAV_FFT_AS=$YASM
-  if test -z "$LIBAV_FFT_AS" ; then
+  if test -z "$YASM" ; then
     AC_MSG_ERROR([Yasm is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed. See https://developer.mozilla.org/en/YASM for more details.])
   fi
   dnl Check that we have the right yasm version.  We require 1.0.1 or newer
   dnl on Linux and 1.1 or newer everywhere else.
   if test "$OS_ARCH" = "Linux" ; then
     if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -eq "0" -a "$_YASM_RELEASE" -lt "1" \) ; then
       AC_MSG_ERROR([Yasm 1.0.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed.  See https://developer.mozilla.org/en/YASM for more details.])
     fi
@@ -6051,17 +6045,16 @@ case "$CPU_ARCH" in
   x86_64)
       MOZ_FFVPX=1
   ;;
 esac
 
 dnl Use same conditional as MOZ_LIBAV_FFT to enable FFmpeg's ffvpx assembly decoder.
 if test -n "$MOZ_LIBAV_FFT"; then
   FFVPX_ASFLAGS=$LIBAV_FFT_ASFLAGS
-  FFVPX_AS=$LIBAV_FFT_AS
 fi
 if test -n "$MOZ_FFVPX"; then
   AC_DEFINE(MOZ_FFVPX)
 fi
 
 dnl ========================================================
 dnl = Enable compilation of specific extension modules
 dnl ========================================================
@@ -8715,38 +8708,36 @@ AC_SUBST(NS_ENABLE_TSF)
 AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
 AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
 
 AC_SUBST(MOZ_VORBIS)
 AC_SUBST(MOZ_TREMOR)
 AC_SUBST(MOZ_WMF)
 AC_SUBST(MOZ_FFMPEG)
 AC_SUBST(MOZ_FFVPX)
-AC_SUBST(FFVPX_AS)
 AC_SUBST_LIST(FFVPX_ASFLAGS)
 AC_SUBST(MOZ_FMP4)
 AC_SUBST(MOZ_EME)
 AC_SUBST(MOZ_DIRECTSHOW)
 AC_SUBST(MOZ_ANDROID_OMX)
 AC_SUBST(MOZ_APPLEMEDIA)
 AC_SUBST(MOZ_OMX_PLUGIN)
 AC_SUBST(MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE)
 AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
-AC_SUBST(VPX_AS)
+AC_SUBST(VPX_USE_YASM)
 AC_SUBST_LIST(VPX_ASFLAGS)
 AC_SUBST(VPX_AS_CONVERSION)
 AC_SUBST(VPX_X86_ASM)
 AC_SUBST(VPX_ARM_ASM)
 AC_SUBST(VPX_NEED_OBJ_INT_EXTRACT)
 AC_SUBST(MOZ_INSTRUMENT_EVENT_LOOP)
 AC_SUBST(MOZ_CODE_COVERAGE)
-AC_SUBST(LIBJPEG_TURBO_AS)
+AC_SUBST(LIBJPEG_TURBO_USE_YASM)
 AC_SUBST_LIST(LIBJPEG_TURBO_ASFLAGS)
 AC_SUBST(MOZ_LIBAV_FFT)
-AC_SUBST(LIBAV_FFT_AS)
 AC_SUBST_LIST(LIBAV_FFT_ASFLAGS)
 AC_SUBST(MOZ_DEVTOOLS)
 
 AC_SUBST(MOZ_PACKAGE_JSSHELL)
 AC_SUBST(MOZ_FOLD_LIBS)
 AC_SUBST(MOZ_FOLD_LIBS_FLAGS)
 AC_SUBST(SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE)