Bug 1776429 - Compile and use ffvpx video decoder/fft code on Apple Silicon Macs. r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D150250
This commit is contained in:
Paul Adenot 2022-06-29 09:55:59 +00:00
Родитель 7b2e3ab738
Коммит dbb13352c1
3 изменённых файлов: 2842 добавлений и 10 удалений

Просмотреть файл

@ -39,7 +39,11 @@
# define HAVE_LIBC_MSVCRT 0
# endif
# elif defined(XP_DARWIN)
# include "config_darwin64.h"
# if defined(__aarch64__)
# include "config_darwin_aarch64.h"
# else
# include "config_darwin64.h"
# endif
# elif defined(XP_UNIX)
# if defined(HAVE_64BIT_BUILD)
# include "config_unix64.h"

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2141,7 +2141,7 @@ with only_when(compile_environment):
@depends(target)
def libav_fft(target):
return target.kernel == "WINNT" or target.cpu == "x86_64"
return target.kernel in ("WINNT", "Darwin") or target.cpu == "x86_64"
set_config("MOZ_LIBAV_FFT", depends(when=libav_fft)(lambda: True))
set_define("MOZ_LIBAV_FFT", depends(when=libav_fft)(lambda: True))
@ -2172,18 +2172,20 @@ with only_when(compile_environment | artifact_builds):
flags = ["-DPIC", "-DWIN64"]
use_nasm = False
elif target.kernel == "Darwin":
# 32/64-bit macosx assemblers need to prefix symbols with an
# underscore.
flags = [
"-DPIC",
"-DMACHO",
"-DPREFIX"
]
if target.cpu == "x86_64":
# 32/64-bit macosx asemblers need to prefix symbols with an
# underscore.
flags = [
flags += [
"-D__x86_64__",
"-DPIC",
"-DMACHO",
"-DPREFIX",
"-Pconfig_darwin64.asm",
]
else:
flac_only = True
elif target.cpu == "aarch64":
use_nasm = False
elif target.cpu == "x86_64":
flags = ["-D__x86_64__", "-DPIC", "-DELF", "-Pconfig_unix64.asm"]
elif target.cpu in ("x86", "arm", "aarch64"):