From 83e7193c99d9e9372848ba058442e0d29a7daef5 Mon Sep 17 00:00:00 2001 From: Alex Chronopoulos Date: Tue, 12 Mar 2019 17:08:55 +0000 Subject: [PATCH] Bug 1534321 - Assembly builds for libdav1d on OSX. r=TD-Linux Differential Revision: https://phabricator.services.mozilla.com/D23111 --HG-- extra : moz-landing-system : lando --- media/libdav1d/moz.build | 2 +- toolkit/moz.configure | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/media/libdav1d/moz.build b/media/libdav1d/moz.build index 16748a3ddc29..b86f2c59ad04 100644 --- a/media/libdav1d/moz.build +++ b/media/libdav1d/moz.build @@ -32,7 +32,7 @@ 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'] diff --git a/toolkit/moz.configure b/toolkit/moz.configure index d6d0c4da2712..fd764a439952 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -445,7 +445,8 @@ def av1(value): 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. '