Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode compile for Intel 32-64bit only

I'm trying to compile only for 32bit and 64bit. No matter what I choose in Xcode, I can either compile for 64bit or for 32bit, 64bit and ppc. I don't want ppc at all. Anyone has any idea how to compile for 32 & 64bit only?

Thanks!

like image 459
bogdansrc Avatar asked Nov 12 '10 23:11

bogdansrc


2 Answers

In the Architectures setting for the project just set it explicitly to i386 and x86_64 rather than using the preset options.

like image 85
Paul R Avatar answered Nov 07 '22 02:11

Paul R


To compile only for i386 and x86_64 (i.e. Intel) and not PPC, do the following:

  1. Go to Project|Edit Project Settings
  2. Select Build tab
  3. In Architectures, do not select any of the standard given options such as Standard (32/64-bit Universal) as these will always throw in ppc. Select Other... and add i386 and x86_64 manually.
  4. In Valid Architectures, make it the same as Architectures (i.e. i386 and x86_64).

Compile. Test with lipo command in shell. (lipo -info test.app/Contents/MacOS/test) It should only say x86_64 i386 for architectures in file.

If that's not the case, then:

Go to Project|Edit Active Target "your app name" and do the same changes you did above, adding i386 and x86_64 manually.

Compile and test with lipo. It should say it's x86_64 i386 only.

like image 3
the979kid Avatar answered Nov 07 '22 02:11

the979kid