Bug 1534321 - Assembly builds for libdav1d on OSX. r=TD-Linux
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 12 Mar 2019 17:08:55 +0000
changeset 521571 dfc0bcb7960e
parent 521570 1e972a9298b7
child 521572 ea49254d7dba
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersTD-Linux
bugs1534321
milestone67.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 1534321 - Assembly builds for libdav1d on OSX. r=TD-Linux Differential Revision: https://phabricator.services.mozilla.com/D23111
media/libdav1d/moz.build
toolkit/moz.configure
--- a/media/libdav1d/moz.build
+++ b/media/libdav1d/moz.build
@@ -27,17 +27,17 @@ SOURCES += [f for f in entrypoint_source
 
 # Don't export DAV1D_API symbols from libxul
 # see: third_party/dav1d/include/dav1d/common.h
 DEFINES['DAV1D_API'] = ''
 
 if CONFIG['MOZ_DAV1D_ASM']:
     # Default stack aligment is 16 bytes
     DIRS += ['asm']
-    if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'x86_64':
+    if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin') and CONFIG['CPU_ARCH'] == 'x86_64':
          # Update stack aligment to 32 bytes
          if CONFIG['CC_TYPE'] == 'clang':
              CFLAGS += ['-mstack-alignment=32']
              for ep in entrypoint_source_files:
                  SOURCES[ep].flags += ['-mstackrealign']
          elif CONFIG['CC_TYPE'] == 'gcc':
              CFLAGS += ['-mpreferred-stack-boundary=5']
              for ep in entrypoint_source_files:
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -440,17 +440,18 @@ option('--disable-av1',
 def av1(value):
     if value:
         return True
 
 @depends(target, nasm_version, when=av1 & compile_environment)
 def dav1d_asm(target, nasm_version):
     if (
             target.os == 'GNU' and target.kernel == 'Linux' and target.cpu in ('x86', 'x86_64') or
-            target.os == 'WINNT' and target.cpu in ('x86', 'x86_64')
+            target.os == 'WINNT' and target.cpu in ('x86', 'x86_64') or
+            target.os == 'OSX' and target.kernel == 'Darwin' and target.cpu == 'x86_64'
        ):
         if nasm_version < '2.13':
             die('nasm 2.13 or greater is required for AV1 support. '
                 'Either install nasm or add --disable-av1 to your configure options.')
         return True
 
 
 set_config('MOZ_DAV1D_ASM', dav1d_asm)