add support for iOS/x86_64

This commit is contained in:
Joel Dice 2015-03-16 11:32:35 -06:00
parent 93a4702de9
commit 575f595292
2 changed files with 24 additions and 11 deletions

View File

@ -62,7 +62,7 @@ Avian can currently target the following platforms:
* Linux (i386, x86_64, ARM, and ARM64) * Linux (i386, x86_64, ARM, and ARM64)
* Windows (i386 and x86_64) * Windows (i386 and x86_64)
* Mac OS X (i386 and x86_64) * Mac OS X (i386 and x86_64)
* Apple iOS (i386, ARM, and ARM64) * Apple iOS (i386, x86_64, ARM, and ARM64)
* FreeBSD (i386, x86_64) * FreeBSD (i386, x86_64)
@ -358,7 +358,7 @@ can also build with the Android class library. Now it should work on Linux, OS X
The simpliest way to build Avian with Android classpath is to use `avian-pack` project: https://github.com/bigfatbrowncat/avian-pack The simpliest way to build Avian with Android classpath is to use `avian-pack` project: https://github.com/bigfatbrowncat/avian-pack
Avian-pack consists of Avian itself with some Android components (such as libcore and icu4c). Avian-pack consists of Avian itself with some Android components (such as libcore and icu4c).
Note that we use the upstream OpenSSL repository and apply the Note that we use the upstream OpenSSL repository and apply the
Android patches to it. This is because it is not clear how to build Android patches to it. This is because it is not clear how to build

View File

@ -86,8 +86,8 @@ ifeq ($(platform),macosx)
endif endif
ifeq ($(platform),ios) ifeq ($(platform),ios)
ifeq ($(filter i386 arm arm64,$(arch)),) ifeq ($(filter i386 x86_64 arm arm64,$(arch)),)
x := $(error "please specify 'arch=i386', 'arch=arm', or 'arch=arm64' with 'platform=ios'") x := $(error "please specify 'arch=i386', 'arch=x86_64', 'arch=arm', or 'arch=arm64' with 'platform=ios'")
endif endif
endif endif
@ -745,10 +745,14 @@ ifeq ($(kernel),darwin)
rpath = rpath =
ifeq ($(platform),ios) ifeq ($(platform),ios)
ifeq ($(arch),i386) ifeq (,$(filter arm arm64,$(arch)))
target = iPhoneSimulator target = iPhoneSimulator
sdk = iphonesimulator$(ios-version) sdk = iphonesimulator$(ios-version)
arch-flag = -arch i386 ifeq ($(arch),i386)
arch-flag = -arch i386
else
arch-flag = -arch x86_64
endif
release = Release-iphonesimulator release = Release-iphonesimulator
else else
target = iPhoneOS target = iPhoneOS
@ -765,7 +769,8 @@ ifeq ($(kernel),darwin)
sdk-dir = $(platform-dir)/Developer/SDKs sdk-dir = $(platform-dir)/Developer/SDKs
ios-version := $(shell \ ios-version := $(shell \
if test -d $(sdk-dir)/$(target)8.1.sdk; then echo 8.1; \ if test -d $(sdk-dir)/$(target)8.2.sdk; then echo 8.2; \
elif test -d $(sdk-dir)/$(target)8.1.sdk; then echo 8.1; \
elif test -d $(sdk-dir)/$(target)8.0.sdk; then echo 8.0; \ elif test -d $(sdk-dir)/$(target)8.0.sdk; then echo 8.0; \
elif test -d $(sdk-dir)/$(target)7.1.sdk; then echo 7.1; \ elif test -d $(sdk-dir)/$(target)7.1.sdk; then echo 7.1; \
elif test -d $(sdk-dir)/$(target)7.0.sdk; then echo 7.0; \ elif test -d $(sdk-dir)/$(target)7.0.sdk; then echo 7.0; \
@ -823,10 +828,18 @@ ifeq ($(kernel),darwin)
endif endif
ifeq ($(arch),x86_64) ifeq ($(arch),x86_64)
classpath-extra-cflags += -arch x86_64 ifeq ($(platform),ios)
cflags += -arch x86_64 classpath-extra-cflags += \
asmflags += -arch x86_64 -arch x86_64 -miphoneos-version-min=$(ios-version)
lflags += -arch x86_64 cflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
asmflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
lflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
else
classpath-extra-cflags += -arch x86_64
cflags += -arch x86_64
asmflags += -arch x86_64
lflags += -arch x86_64
endif
endif endif
cflags += -I$(JAVA_HOME)/include/darwin cflags += -I$(JAVA_HOME)/include/darwin