(macOS) Set up CROSS_COMPILE for ARM 64bit

This commit is contained in:
twinaphex 2021-01-28 10:10:59 +01:00
parent 3b7b187ed5
commit 29592dc40d
2 changed files with 19 additions and 1 deletions

View File

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

View File

@ -87,8 +87,16 @@ else ifeq ($(platform), osx)
SHARED := -dynamiclib SHARED := -dynamiclib
OSXVER = `sw_vers -productVersion | cut -d. -f 2` OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
fpic += -mmacosx-version-min=10.1
LDFLAGS += -framework CoreFoundation LDFLAGS += -framework CoreFoundation
ifeq ($(OSX_LT_MAVERICKS),YES)
fpic += -mmacosx-version-min=10.1
endif
ifeq ($(CROSS_COMPILE),1)
TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
CFLAGS += $(TARGET_RULE)
LDFLAGS += $(TARGET_RULE)
endif
# iOS # iOS
else ifneq (,$(findstring ios,$(platform))) else ifneq (,$(findstring ios,$(platform)))