Вопрос

In iOS and OS X SDK's, where are those architecture values defined?

The reason I am interested is because I used to conditionally compile code for the iOS Simulator as follows:

#ifdef __i386__
   // Simulator-only code
#endif

And just noticed that I haven't updated it for the new 64-bit iOS Simulator by also checking for __x86_64__, and I'm also curious about other defines as there doesn't seem to be an official Apple documentation file for this.

Это было полезно?

Решение

Those values are defined by CLANG at compilation time depending on the target you happen to be building for, but were formalized by the GNU C spec for use in GCC.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top