Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Apple iOS and improve detection of arm architecture #2

Merged
merged 6 commits into from
Mar 20, 2014

Conversation

fdetro
Copy link
Contributor

@fdetro fdetro commented Feb 26, 2014

I've added a new predef BOOST_OS_IOS for Apple iOS based on detection of the preprocessor macro __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__.

Additionally, I've extended the detection for BOOST_ARCH_ARM with a check for __arm64, a preprocessor macro which is set by the Apple clang compiler for the new ARMv8 64bit architecture.

Both changes enable the use of boost::predef with projects targeting Apple iOS for 32 and 64bit arm architectures.

It would be great if this patch can make it into the next boost release!

@ruslo
Copy link
Contributor

ruslo commented Mar 3, 2014

Good patch. BTW it would be nice to have ios simulator detection macro too.

@fdetro
Copy link
Contributor Author

fdetro commented Mar 3, 2014

iOS simulator detection is already there:

BOOST_OS_IOS && BOOST_ARCH_ARM -> iOS device mode
BOOST_OS_IOS && BOOST_ARCH_X86 -> iOS simulator mode

@ruslo
Copy link
Contributor

ruslo commented Mar 3, 2014

Well, it's true (: But I think first people's step will be:

#if BOOST_OS_IOS
# if BOOST_ARCH_ARM
#  define MY_MACRO_OS_IOS_DEVICE
# else
#  define MY_MACRO_OS_IOS_SIMULATOR
# endif
#endif

@fdetro
Copy link
Contributor Author

fdetro commented Mar 3, 2014

OK, now I see what you mean. I should probably introduce BOOST_OS_IOS_DEVICE and BOOST_OS_IOS_SIMULATOR, too.

@@ -0,0 +1,51 @@
/*
Copyright Rene Rivera 2008-2013
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me to be able to add any new code to a Boost library there must be correct copyright attribution. Please update with your copyright.

@fdetro
Copy link
Contributor Author

fdetro commented Mar 20, 2014

I've changed everything as requested by the review. Is the patch OK now?

grafikrobot added a commit that referenced this pull request Mar 20, 2014
Add support for Apple iOS and improve detection of arm architecture. Thanks to Franz Detro for the changes.
@grafikrobot grafikrobot merged commit 699b660 into boostorg:develop Mar 20, 2014
@ruslo
Copy link
Contributor

ruslo commented Apr 28, 2014

Hi, what about BOOST_OS_IOS_DEVICE and BOOST_OS_IOS_SIMULATOR?

@fdetro
Copy link
Contributor Author

fdetro commented Apr 30, 2014

@ruslo: This DEVICE vs. SIMULATOR case does not really match with the predef OS concept, so I left this out for now.

Maybe @grafikrobot can comment on this...

@grafikrobot
Copy link
Member

There's the concept of "platforms" that would likely fit the different iOS
targets. Perhaps having "BOOST_PLAT_IOS_DEVICE" and
"BOOST_PLAT_IOS_SIMULATOR"?

On Wed, Apr 30, 2014 at 1:55 AM, Franz Detro [email protected]:

@ruslo https://github.com/ruslo: This DEVICE vs. SIMULATOR case does
not really match with the predef OS concept, so I left this out for now.

Maybe @grafikrobot https://github.com/grafikrobot can comment on this...


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-41766106
.

-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

@ruslo
Copy link
Contributor

ruslo commented May 1, 2014

Perhaps having "BOOST_PLAT_IOS_DEVICE" and "BOOST_PLAT_IOS_SIMULATOR"?

Sounds nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants