Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode settings: architecture vs valid architecture

I was looking at the configuration of the Sparkle project and noticed that they set:

  • Architectures = ppc i386 x86_64
  • Valid architectures = i386 x86_64

Valid architectures description from apple:

Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on. If the resulting architecture list is empty, the target generates no binary.

So, why set architectures different from valid architectures if it won't run on ppc anyways?

like image 895
Daniel Avatar asked Apr 11 '12 10:04

Daniel


People also ask

What is build active architecture only in Xcode?

The "build active architecture only" setting causes everything except the current Mac's architecture to be ignored (and the current one is of course valid), hiding the problem. Instead, you should look up a row or two in the settings, and change the "Architectures" setting to "Standard".

What is build architecture in Xcode?

Build Active Architecture Only This is the bool value which specifies the architectures Xcode is going to build for all the valid architectures or only for the one on which the app is currently being run on by looking to the target selected for. By default in Debug mode Build Active Architecture Only value is YES.

What is Valid_archs?

VALID_ARCHS (Valid Architectures) Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on.

What is Only_active_arch?

ONLY_ACTIVE_ARCH (Build Active Architecture Only) Description: Boolean value. Specifies whether the product includes only object code for the native architecture.


1 Answers

When set to 'Native architecture of the Build Machine', you might want to specify which architectures your app works on.

For example, if you have an app that isn't ready for 64-bit environment (it might compile, but it would crash), you put valid architectures just 32-bit, so it won't build the 64-bit section even on 64-bit computer.

As for your Sparkle question - you'll need to ask Sparkle devs, but I bet it's just a value that comes from days when PPC was still widely used.

like image 153
Charlie Monroe Avatar answered Oct 23 '22 19:10

Charlie Monroe