PDA

View Full Version : Difference between 32-bit and 64-bit builds in Xcode?




Littleodie914
Jun 23, 2011, 06:59 AM
Hey guys, I've been upgrading my dev. environment to Xcode 4, and I noticed a confusing change in the Scheme menu. (See screenshot.)

What is the difference between the 32-bit scheme and the 64-bit scheme? My project settings seem to indicate that the build is both 32- and 64-bit.

A bit of research didn't turn up too much on the subject. :o



jiminaus
Jun 23, 2011, 07:05 AM
You're right that you're build a 32-bit/64-bit Universal app.

Primarily you're choosing weather you're running your Universal app as a 64-bit app or a 32-bit app. But you can customise any aspect of the phases differently between 32-bit and 64-bit development.

mif
Jun 23, 2011, 07:08 AM
64-bit application can only be used with newer 64-bit prosessors, i guess.

Littleodie914
Jun 23, 2011, 07:15 AM
You're right that you're build a 32-bit/64-bit Universal app.

Primarily you're choosing weather you're running your Universal app as a 64-bit app or a 32-bit app. But you can customise any aspect of the phases differently between 32-bit and 64-bit development.So the actual application will be compiled, regardless of which Scheme I choose, as a Universal app.

Picking one of the 'bit-specific' Schemes only defines in which mode it will be running on my machine in Xcode?

jiminaus
Jun 23, 2011, 07:16 AM
No, I'm wrong about being able to customise the scheme settings between 32-bit and 64-bit. You can't. Unless you create different schemes. The 64-bit verses 32-bit are destinations of the same scheme, with the same settings. It's just about "where" the program is run.

Another example of destination is in iOS development. In iOS projects, you'll have an iPad simulator destination, an iPhone simulator destination, and an iOS device destination.


So the actual application will be compiled, regardless of which Scheme I choose, as a Universal app.


Yes, this is determined by the target build settings, not the scheme. A scheme can choose which targets to build and what they're built for (eg run, test or profile) and the build configuration (debug vs. release), but not the build settings like which architectures are built.

robbieduncan
Jun 23, 2011, 07:37 AM
I don't know if this is true, perhaps you can build in both schemes and check, but there is key that can appear in Info.plist that lists the preference order of the binary types that appear in the fat binary. It is possible that compiling in 32-bit scheme makes the 32-bit binary the first item in the order and the 64-bit binary second.

jiminaus
Jun 23, 2011, 07:43 AM
I don't know if this is true, perhaps you can build in both schemes and check, but there is key that can appear in Info.plist that lists the preference order of the binary types that appear in the fat binary. It is possible that compiling in 32-bit scheme makes the 32-bit binary the first item in the order and the 64-bit binary second.

I don't know about that info.plist list key. I'd only used the arch command to determine which environment to run in. But that's no good for testing when a app is opened from the Finder.

robbieduncan
Jun 23, 2011, 07:45 AM
I don't know about that info.plist list key. I'd only used the arch command to determine which environment to run in. But that's no good for testing when a app is opened from the Finder.

I only know about it as I was poking around in the iTunes 10.5 beta. It also has a key that lets you set architecture/OS compatibility: it only runs 64-bit on Lion.