With the introduction of arm64
as a standard architecture for the iphoneos
platform it's necessary in some cases to implement compile-time conditions for code that is specific to the 64/32 architecture.
If you look at CoreGraphics/CGBase.h
and how some popular open source projects are providing support for arm64 it's clear that you can check for the presence of the 64bit runtime like so:
#if defined(__LP64__) && __LP64__
...
#else
...
#endif
It's also possible to check specifically for arm64
(as opposed to just a 64bit runtime) as mentioned in this fix for erikdoe/ocmock
#ifdef __arm64__
...
#else
....
#endif
Is there a comprehensive list, or documentation for these kinds of definitions? Where or how are they defined?