From 4298eaef765be3fda2c39f48f299deafa3f4a519 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 21 Mar 2011 04:19:27 +0000 Subject: [PATCH] Building for iPhoneSim is a mixed bag, it's OSX and it's not. We actually need to compile as OSX but tell it that we are requiring iOS by defining __IPHONE_OS_VERSION_MIN_REQUIRED=X instead of -miphoneos-version-min=X. [SVN r70298] --- src/tools/darwin.jam | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam index 703803ad5..283dface9 100644 --- a/src/tools/darwin.jam +++ b/src/tools/darwin.jam @@ -254,6 +254,22 @@ local rule init-sdk ( condition * : root ? : version + : version-feature ? ) # Then device variation options. switch $(version[1]) { + case iphonesim* : + { + local N = $(version[2]) ; + if ! $(version[3]) { N += 00 ; } + else if [ regex.match (..) : $(version[3]) ] { N += $(version[3]) ; } + else { N += 0$(version[3]) ; } + if ! $(version[4]) { N += 00 ; } + else if [ regex.match (..) : $(version[4]) ] { N += $(version[4]) ; } + else { N += 0$(version[4]) ; } + N = $(N:J=) ; + flags darwin.compile OPTIONS $(version-feature) + : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ; + flags darwin.link OPTIONS $(version-feature) + : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ; + } + case iphone* : { flags darwin.compile OPTIONS $(version-feature) @@ -482,7 +498,8 @@ flags darwin.link OPTIONS space : -Wl,-dead_strip -no_dead_strip_i flags darwin.compile OPTIONS shared : -dynamic ; # Misc options. -flags darwin.compile OPTIONS : -no-cpp-precomp -gdwarf-2 ; +flags darwin.compile OPTIONS : -no-cpp-precomp -gdwarf-2 -fexceptions ; +#~ flags darwin.link OPTIONS : -fexceptions ; # Add the framework names to use. flags darwin.link FRAMEWORK ;