[cfe-dev] Success compiling Adium

steve naroff snaroff at apple.com
Sun Jan 25 16:18:46 PST 2009


On Jan 25, 2009, at 7:03 PM, David Smith wrote:

>
> On Jan 25, 2009, at 3:44 PM, steve naroff wrote:
>
>>
>> On Jan 25, 2009, at 6:35 PM, David Smith wrote:
>>
>>> 	I just successfully compiled and ran Adium for the first time using
>>> ccc. Thanks to everyone involved for the huge progress that's been
>>> made :) At the moment compile times are around 50% slower than GCC  
>>> 4.2
>>> for the whole project, but I haven't yet investigated why that is.  
>>> The
>>> next thing I plan to try is compiling with precompiled headers
>>> disabled to see how much that changes the ratio.
>>>
>>
>> Thanks for the update/info!
>>
>> Two things to verify...
>>
>> #1: Make sure you are running "Release" build of clang.
>> #2: You might try using clang's recently added "token cache" feature.
>>
>> snaroff
>
> I did make ENABLE_OPTIMIZED=1 when building llvm, then did:
> export PATH=/Volumes/Other/llvm/Release/bin/:$PATH
> export CCC=/Volumes/Other/llvm/tools/clang/tools/ccc/ccc
> time xcodebuild -parallelizeTargets CC=$CCC LD=$CCC
> So I believe that should be with a release build of clang. However,  
> it didn't feel as much faster than the debug build I had as I would  
> have expected, so I will double check that.
>

It should feel much faster. If I recall, the release build is 5-10x  
faster than the debug build.

> How would I go about using the token cache? Looking at Tools.py, it  
> seems to attempt to do some things with it automatically, but it's  
> not completely clear to me that what I'm doing would be sufficient  
> to trigger that.

If your project is set up to use a pre-compiled prefix header (with  
GCC), then it should be straightforward.

Here is an example using clang directly (I don't have any experience  
with using Tools.py):

clang -x c-header PrefixHeader.h  -o /tmp/PrefixHeader.pth
clang -token-cache /tmp/PrefixHeader.pth SomeModule.m

snaroff

>
>
> 			David




More information about the cfe-dev mailing list