If you want to specify additional per-architecture compiler flags, you can use the PER_ARCH_CFLAGS_<arch>
family of build settings, where <arch> is the name of the architecture. For example, to specify compiler flags
that apply only to 64-bit Intel compilation, add them to the PER_ARCH_CFLAGS_x86_64 build setting.
For example, if you want to make your 64-bit slice run only on OS X v10.6 instead of v10.5, you could set a
per-architecture value for “OS X Deployment Target”:
●
Click the target and choose “Get Info” from the File menu.
●
Click “OS X Deployment Target”.
●
Click the gear at the lower left corner of the info window and choose “Add Build Condition Setting” from
the resulting pop-up menu.
●
Change the architecture to “Intel 64-bit” and specify the x86-64 setting for this option.
●
Add additional conditions as needed for additional architectures.
●
Change the main setting (above the constrained settings) to whatever you want the default value to be.
Compiling 64-Bit Code
Using Architecture-Specific Flags
2012-12-13 | Copyright © 2004, 2012 Apple Inc. All Rights Reserved.
34
Commentaires sur ces manuels