(macOS) Add ARM 64bit MacOS support

This commit is contained in:
twinaphex 2021-01-29 20:40:13 +01:00
parent e3d579e554
commit f48a1b50bb
2 changed files with 25 additions and 2 deletions

View File

@ -33,6 +33,10 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-x64.yml'
# MacOS ARM 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-arm64.yml'
################################## CELLULAR ################################
# Android
- project: 'libretro-infrastructure/ci-templates'
@ -121,6 +125,12 @@ libretro-build-osx-x64:
- .libretro-osx-x64-make-default
- .core-defs
# MacOS ARM 64-bit
libretro-build-osx-arm64:
extends:
- .libretro-osx-arm64-make-default
- .core-defs
################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:

View File

@ -149,14 +149,27 @@ else ifeq ($(platform), osx)
SHARED := -dynamiclib
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
MINVERSION=
ifeq ($(OSX_LT_MAVERICKS),"YES")
fpic += -mmacosx-version-min=10.5
MINVERSION = -mmacosx-version-min=10.5
endif
ifndef ($(NOUNIVERSAL))
ifeq ($(shell uname -p),arm)
MINVERSION =
endif
ifeq ($(CROSS_COMPILE),1)
TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
CFLAGS += $(TARGET_RULE)
CPPFLAGS += $(TARGET_RULE)
CXXFLAGS += $(TARGET_RULE)
LDFLAGS += $(TARGET_RULE)
MINVERSION =
endif
ifeq ($(UNIVERSAL),1)
CFLAGS += $(ARCHFLAGS)
CXXFLAGS += $(ARCHFLAGS)
LDFLAGS += $(ARCHFLAGS)
endif
fpic += $(MINVERSION)
# iOS
else ifneq (,$(findstring ios,$(platform)))