Skip to content

Commit

Permalink
Merge pull request #107 from yoshisuga/ios_tvos_arm64_support
Browse files Browse the repository at this point in the history
(iOS/tvOS): Support building for arm64
  • Loading branch information
inactive123 authored Sep 5, 2019
2 parents a9f220a + d54655a commit 3a26c9f
Showing 1 changed file with 37 additions and 7 deletions.
44 changes: 37 additions & 7 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,20 @@ else ifneq (,$(findstring ios,$(platform)))
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
CC = clang -arch armv7 -isysroot $(IOSSDK)
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
ifeq ($(platform),ios-arm64)
CC = clang -arch arm64 -isysroot $(IOSSDK)
CXX = clang++ -arch arm64 -isysroot $(IOSSDK)
CFLAGS += -marm -DARM -D__aarch64__=1
else
CC = clang -arch armv7 -isysroot $(IOSSDK)
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm
ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
endif
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm
ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
CFLAGS += -DIOS

ifeq ($(platform),ios9)
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
CC += -miphoneos-version-min=8.0
CXX += -miphoneos-version-min=8.0
CC_AS += -miphoneos-version-min=8.0
Expand All @@ -162,8 +168,32 @@ endif
use_fame = 1
use_drz80 = 0
use_cz80 = 1
use_sh2drc = 1
use_svpdrc = 1
ifeq ($(platform),ios-arm64)
use_sh2drc = 0
use_svpdrc = 0
else
use_sh2drc = 1
use_svpdrc = 1
endif

# tvOS
else ifeq ($(platform), tvos-arm64)
ARCH := arm
use_cyclone = 0
use_fame = 1
use_drz80 = 0
use_cz80 = 1
use_sh2drc = 0
use_svpdrc = 0
TARGET := $(TARGET_NAME)_libretro_tvos.dylib
SHARED := -dynamiclib
fpic := -fPIC
APPLE := 1
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
endif
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
CFLAGS += -DIOS

# PS3
else ifeq ($(platform), ps3)
Expand Down

0 comments on commit 3a26c9f

Please sign in to comment.