Bug 1364237 - aom: Enable YASM for intel cpus. r=froydnj draft
authorRalph Giles <giles@mozilla.com>
Thu, 11 May 2017 15:31:50 -0700
changeset 576968 fc0075f3d145f1fc59222a24f0fd5592e8286d23
parent 576967 6da3ac8d48cd87db6b7f3242e23383266acacccb
child 628373 e4daa17d37b624c907cf199fcc03bb8ad0f65bcd
push id58549
push userbmo:giles@thaumas.net
push dateFri, 12 May 2017 15:13:28 +0000
reviewersfroydnj
bugs1364237
milestone55.0a1
Bug 1364237 - aom: Enable YASM for intel cpus. r=froydnj I had removed the USE_YASM define in porting the libvpx moz.build to libaom, to avoid depending on VPX_USE_ASM. Turns out USE_YASM is a magic context define, without which the build won't compile libaom's yasm-format .asm files, so we need to define it for the two intel architecture source sets. Restore the define unconditionally for intel targets. We require yasm in the default build for those targets, and want to fail if it isn't available to block performance regressions. MozReview-Commit-ID: CqGtY8RNLNf
media/libaom/moz.build
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -8,28 +8,30 @@ with Files('*'):
     BUG_COMPONENT = ('Core', 'Audio/Video')
 
 include('sources.mozbuild')
 
 # Linux, Mac and Win share file lists for x86* but not configurations.
 if CONFIG['CPU_ARCH'] == 'x86_64':
     EXPORTS.aom += files['X64_EXPORTS']
     SOURCES += files['X64_SOURCES']
+    USE_YASM = True
     if CONFIG['OS_TARGET'] == 'WINNT':
         ASFLAGS += [ '-I%s/media/libaom/config/win/x64/' % TOPSRCDIR ]
         CFLAGS += [ '-I%s/media/libaom/config/win/x64/' % TOPSRCDIR ]
     elif CONFIG['OS_TARGET'] == 'Darwin':
         ASFLAGS += [ '-I%s/media/libaom/config/mac/x64/' % TOPSRCDIR ]
         CFLAGS += [ '-I%s/media/libaom/config/mac/x64/' % TOPSRCDIR ]
     else: # Android, Linux, BSDs, etc.
         ASFLAGS += [ '-I%s/media/libaom/config/linux/x64/' % TOPSRCDIR ]
         CFLAGS += [ '-I%s/media/libaom/config/linux/x64/' % TOPSRCDIR ]
 elif CONFIG['CPU_ARCH'] == 'x86':
     EXPORTS.aom += files['IA32_EXPORTS']
     SOURCES += files['IA32_SOURCES']
+    USE_YASM = True
     if CONFIG['OS_TARGET'] == 'WINNT':
         ASFLAGS += [ '-I%s/media/libaom/config/win/ia32/' % TOPSRCDIR ]
         CFLAGS += [ '-I%s/media/libaom/config/win/ia32/' % TOPSRCDIR ]
     else: # Android, Linux, BSDs, etc.
         ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ]
         CFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ]
 elif CONFIG['CPU_ARCH'] == 'arm':
     EXPORTS.aom += files['ARM_EXPORTS']