diff options
| author | bors <bors@rust-lang.org> | 2013-11-01 02:26:23 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-01 02:26:23 -0700 |
| commit | fa8a202858f3d5edacce4ecd09b0670e9670e817 (patch) | |
| tree | 979e96c111f43548297449996512c6c002ed07e9 | |
| parent | 986d1f78be2f01496b625a2921adf46015a3a2df (diff) | |
| parent | 5864ad9ab1816c204301ffa4cffe39a4248d1d10 (diff) | |
| download | rust-fa8a202858f3d5edacce4ecd09b0670e9670e817.tar.gz rust-fa8a202858f3d5edacce4ecd09b0670e9670e817.zip | |
auto merge of #10203 : kud1ing/rust/ios, r=alexcrichton
This is based on the work by @dobkeratops, updated and extended to work for Xcode 5. This gets you going. I will add separate PRs for compilation/linking fixes. See also https://github.com/mozilla/rust/wiki/Doc-building-for-ios
| -rwxr-xr-x | configure | 7 | ||||
| -rw-r--r-- | mk/platform.mk | 29 |
2 files changed, 36 insertions, 0 deletions
diff --git a/configure b/configure index ec14dc0dbcc..ad4b77598b3 100755 --- a/configure +++ b/configure @@ -670,6 +670,13 @@ do fi ;; + arm-apple-darwin) + if [ $CFG_OSTYPE != apple-darwin ] + then + err "The iOS target is only supported on Mac OS X" + fi + ;; + *) ;; esac diff --git a/mk/platform.mk b/mk/platform.mk index 70dec09971b..e7c9a10bc63 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -193,6 +193,35 @@ CFG_LDPATH_i686-unknown-linux-gnu := CFG_RUN_i686-unknown-linux-gnu=$(2) CFG_RUN_TARG_i686-unknown-linux-gnu=$(call CFG_RUN_i686-unknown-linux-gnu,,$(2)) +# arm-apple-darwin configuration +ifeq ($(CFG_OSTYPE),apple-darwin) +CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos) +CFG_IOS_FLAGS = -target arm-apple-darwin -isysroot $(CFG_IOS_SDK) -I $(CFG_IOS_SDK)/usr/include -I $(CFG_IOS_SDK)/usr/include/c++/4.2.1 -I /usr/include +CC_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang) +CXX_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++) +CPP_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++) +AR_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos ar) +CFG_LIB_NAME_arm-apple-darwin = lib$(1).dylib +CFG_LIB_GLOB_arm-apple-darwin = lib$(1)-*.dylib +CFG_LIB_DSYM_GLOB_arm-apple-darwin = lib$(1)-*.dylib.dSYM +CFG_GCCISH_CFLAGS_arm-apple-darwin := -Wall -Werror -g -fPIC $(CFG_IOS_FLAGS) +CFG_GCCISH_CXXFLAGS_arm-apple-darwin := -fno-rtti $(CFG_IOS_FLAGS) +CFG_GCCISH_LINK_FLAGS_arm-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind +CFG_GCCISH_DEF_FLAG_arm-apple-darwin := -Wl,-exported_symbols_list, +CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-darwin := +CFG_GCCISH_POST_LIB_FLAGS_arm-apple-darwin := +CFG_DEF_SUFFIX_arm-apple-darwin := .darwin.def +CFG_INSTALL_NAME_arm-apple-darwin = -Wl,-install_name,@rpath/$(1) +CFG_LIBUV_LINK_FLAGS_arm-apple-darwin = +CFG_EXE_SUFFIX_arm-apple-darwin := +CFG_WINDOWSY_arm-apple-darwin := +CFG_UNIXY_arm-apple-darwin := 1 +CFG_PATH_MUNGE_arm-apple-darwin := true +CFG_LDPATH_arm-apple-darwin := +CFG_RUN_arm-apple-darwin = $(2) +CFG_RUN_TARG_arm-apple-darwin = $(call CFG_RUN_arm-apple-darwin,,$(2)) +endif + # x86_64-apple-darwin configuration CC_x86_64-apple-darwin=$(CC) CXX_x86_64-apple-darwin=$(CXX) |
