Re: Different build locations for different architectures?
Re: Different build locations for different architectures?
- Subject: Re: Different build locations for different architectures?
- From: Jason Swain <email@hidden>
- Date: Thu, 22 Jul 2010 09:27:06 +0100
You could build a single universal binary and then have a script build phase that copies your app to each of ../Bin/MacIntel32/<BuildConfiguration>/ etc. and then uses lipo to strip the binary down to only the required architecture. There's a bit of work in setup, but I think that achieves what you want of a single build command creating all the binaries you want. You could make this build phase only run for the release build too.
Jason
On 22 Jul 2010, at 08:44, Guillaume Billard wrote:
> Le 21 juil. 2010 à 18:53, Christiaan Hofman a écrit :
>
>>
>> On Jul 21, 2010, at 15:16, Guillaume Billard wrote:
>>
>>> Hello,
>>>
>>> I'd like to set different build paths depending on the architecture being built, eg. for SYMROOT ("Build Products Path"):
>>> .../Bin/MacIntel32/<BuildConfiguration>/ for a i386-only build
>>> .../Bin/MacIntel64/<BuildConfiguration>/ for a x86_64-only build
>>> .../Bin/MacIntel/<BuildConfiguration>/ for a i386 + x86_64 build
>>>
>>> But the "Add Build Setting Condition" feature is greyed out for all "Build Locations" in Xcode 3.2.2. These are common locations, regardless of the active architecture or the combination of available architectures.
>>> If I build i386 only, then switch to x86_64, a new build will overwrite the products inside this common location.
>>> Is there a workaround? If not, will this be possible in Xcode 4? Should I file a feature request?
>>>
>>> Thanks.
>>>
>>>
>>> Guillaume
>>>
>>
>> Having a build location depending on the arch does not make any sense, because they may, and generally are, combined in a single universal binary. So I would not even see any reasonable condition on which this could depend. So it should therefore be clear that this can't and won't be supported.
>>
>> The only way I can imagine how this could work (and that already works as it is) is to have different custom build configurations for the one-arch-only builds.
>>
>> Christiaan
>>
>
>
> Our application is downloaded from the web and run inside a browser plugin. We need to reduce the download time as much as possible. So we'd rather have the user download 32-bit-only binaries when the app is run from a 32-bit browser, and download 64-bit-only binaries when the app is run from a 64-bit browser.
> Because we generate our Xcode projects from a single file and maintain only this file, we could indeed have different custom build configurations, or different projects. Or add a "Run Script Build Phase" to copy the output binaries to a specific location, to avoid overwriting them in the common build location. But none of these seem as practical as a build location depending on the arch.
> I hope it makes sense now!
>
> Guillaume
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden