Difference between "My Mac 32-bit" and "My Mac 64-bit" in Xcode 4?
I have a Cocoa project that I recently imported into Xcode 4. I notice two Schemes for each of my specific build targets, one for 32-bit, and one for 64-bit. My Project settings are set to "Standard (32/64-bit Intel)".
When I select the "My Mac 32-bit" Scheme, does this compile it for 32-bit machines, and selecting "My Mac 64-bit", then compiles it for 64-bit machines? If I select the "My Mac 64-bit" Scheme, will it开发者_运维百科 no longer run on 32-bit machines at all?
Mac OS X allow you to run 64 bits software on 32 bits Mac OS X and the reverse, 32 bits software on 64 bits Mac OS X. If your software use a lot of memory, don't hesitate to choose the 64 bits option. Else, you should benchmark to see what is better, as 64 bits software on a 32 bits kernel tend to have a bit of a performance hit.
some more info about it : http://macperformanceguide.com/SnowLeopard-64bit.html
The Scheme setting changes what happens in Xcode when you click Run, Build, etc. The architecture settings are changed inside the project settings, visible in your screen shot. Only there would you be able to chose "32-bit only" or "64-bit only". And it is likely that if you publish a binary with 64-bit only it wouldn't run on 32-bit machines. You would have to build for both platforms and include both binaries in a single Universal binary to get backwards compatibility with 32-bit-only Macs.
Changing the scheme setting from "My Mac 32-bit" to "My Mac 64-bit" does not change how the app is compiled. It only changes what binary version is launched immediately on your machine for testing or profiling. The app continues to have both binaries for 32 and 64 bit compiled and included in the final product for shipping as a universal application.
精彩评论