Commit b3b588a6 authored by Andoni Morales Alastruey's avatar Andoni Morales Alastruey Committed by Matthew Waters
Browse files

libvpx: add support for macOS ARM64

Part-of: <!661>
parent 98edefa2
......@@ -39,6 +39,8 @@ class Recipe(recipe.Recipe):
'libvpx/0007-remove-old-visual-studio-remnants.patch',
# From upstream git master, remove on bump
'libvpx/0008-support-visual-studio-2019-vs16.patch',
# From upstream git master, remove on bump
'libvpx/0001-configure-add-darwin20-support.patch',
]
files_libs = ['libvpx']
......@@ -69,7 +71,10 @@ class Recipe(recipe.Recipe):
if self.config.target_platform == Platform.DARWIN:
self.configure_options += '--enable-shared '
platform = 'darwin12'
if self.config.target_arch == Architecture.ARM64:
platform = 'darwin20'
else:
platform = 'darwin12'
elif self.config.target_platform == Platform.IOS:
if self.config.target_arch == Architecture.X86 or self.config.target_arch == Architecture.X86_64:
platform = 'iphonesimulator'
......
From 99600f91a83f0d76a28b2ace99298e83b11da65d Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Fri, 25 Sep 2020 13:21:11 -0700
Subject: [PATCH] configure: add darwin20 support
this release will have arm64 and x86_64 support. in the future it might
be useful to move to mac/iphone targets to help disambiguate
arm64-darwin-gcc and arm64-darwin20-gcc.
Change-Id: I1f8b145303204af316955822f5e8bab51c47f353
---
README | 1 +
build/make/configure.sh | 14 +++++++++++---
configure | 1 +
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/README b/README
index 8e0da5c..eccc571 100644
--- a/README
+++ b/README
@@ -62,6 +62,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
arm64-android-gcc
arm64-darwin-gcc
+ arm64-darwin20-gcc
arm64-linux-gcc
arm64-win64-gcc
arm64-win64-vs15
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 4f3b32b..273fc81 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -799,6 +799,10 @@ process_common_toolchain() {
tgt_isa=x86_64
tgt_os=darwin17
;;
+ *darwin20*)
+ tgt_isa=`uname -m`
+ tgt_os=`echo $gcctarget | sed 's/.*\(darwin2[0-9]\).*/\1/'`
+ ;;
x86_64*mingw32*)
tgt_os=win64
;;
@@ -873,7 +877,7 @@ process_common_toolchain() {
# Handle darwin variants. Newer SDKs allow targeting older
# platforms, so use the newest one available.
case ${toolchain} in
- arm*-darwin*)
+ arm*-darwin-*)
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
if [ -d "${iphoneos_sdk_dir}" ]; then
@@ -881,7 +885,7 @@ process_common_toolchain() {
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
fi
;;
- x86*-darwin*)
+ *-darwin*)
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
if [ -d "${osx_sdk_dir}" ]; then
add_cflags "-isysroot ${osx_sdk_dir}"
@@ -931,6 +935,10 @@ process_common_toolchain() {
add_cflags "-mmacosx-version-min=10.13"
add_ldflags "-mmacosx-version-min=10.13"
;;
+ *-darwin20-*)
+ add_cflags "-mmacosx-version-min=10.16"
+ add_ldflags "-mmacosx-version-min=10.16"
+ ;;
*-iphonesimulator-*)
add_cflags "-mios-simulator-version-min=${IOS_VERSION_MIN}"
add_ldflags "-mios-simulator-version-min=${IOS_VERSION_MIN}"
@@ -1104,7 +1112,7 @@ EOF
soft_enable unit_tests
;;
- darwin*)
+ darwin)
XCRUN_FIND="xcrun --sdk iphoneos --find"
CXX="$(${XCRUN_FIND} clang++)"
CC="$(${XCRUN_FIND} clang)"
diff --git a/configure b/configure
index b681f1b..f097266 100755
--- a/configure
+++ b/configure
@@ -99,6 +99,7 @@ EOF
# alphabetically by architecture, generic-gnu last.
all_platforms="${all_platforms} arm64-android-gcc"
all_platforms="${all_platforms} arm64-darwin-gcc"
+all_platforms="${all_platforms} arm64-darwin20-gcc"
all_platforms="${all_platforms} arm64-linux-gcc"
all_platforms="${all_platforms} arm64-win64-gcc"
all_platforms="${all_platforms} arm64-win64-vs15"
--
2.23.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment