(macOS) Add ARM 64bit Mac support

This commit is contained in:
twinaphex 2021-01-29 06:35:57 +01:00
parent 9d4799b849
commit c35e60a407
2 changed files with 24 additions and 0 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'
@ -125,6 +129,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

@ -19,6 +19,9 @@ ifeq ($(platform),)
else ifneq ($(findstring Darwin,$(shell uname -s)),)
platform = osx
arch = intel
ifeq ($(shell uname -p),arm64)
arch = arm
endif
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
@ -35,6 +38,9 @@ ifeq ($(shell uname -a),)
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
arch = intel
ifeq ($(shell uname -p),arm64)
arch = arm
endif
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
@ -75,6 +81,14 @@ else ifeq ($(platform), osx)
CFLAGS += -DHAVE_NO_LANGEXTRA
CXXFLAGS += -DHAVE_NO_LANGEXTRA
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)
endif
# iOS
else ifneq (,$(findstring ios,$(platform)))
TARGET := $(TARGET_NAME)_libretro_ios.dylib