• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode and ccache
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode and ccache


  • Subject: Re: Xcode and ccache
  • From: Steve Checkoway <email@hidden>
  • Date: Sun, 2 Apr 2006 00:12:25 -0800


On Mar 30, 2006, at 8:17 PM, Chris Espinosa wrote:


On Mar 17, 2006, at 5:51 AM, Clark Cox wrote:

I was wondering if anyone knows how to get Xcode to use ccache as it's
compiler. I've installed ccache, and put appropriate links in my path.
This works perfectly for things built via make, or by directly calling
gcc from the commandline. However, seeing as Xcode calls the compiler
with an absolute path "/usr/bin/gcc", distcc is never being called
when building projects via xcodebuild or from the Xcode GUI.

Xcode uses the path to the compiler defined in the Rules tab of the Targets inspector, or by the value of the $(CC) build setting.  Try setting those.

I sent an e-mail to the list regarding this a few days ago, but I have no idea if it actually made it though since my mail server decided to go down and lose several days of mail. I found that I was unable to actually use ccache with Xcode because Xcode seems to always use the -x flag. 

I patched ccache to accept -x as well as more file extensions (.mm, .M, etc.). I never quite got it working with precompiled headers. I had it print out all of the arguments used to call gcc and when I called them myself it worked, when ccache exec'd those exact same arguments, it didn't work because the precompiled header doesn't actually exist at the path passed after -include. Still, the fact that it worked when calling gcc from the shell but not when execing confused me and I stopped there.

I also wrote a simple wrapper program with a simple Makefile that moves gcc (and a few others) to a specified location and adds symlinks to point to the wrapper program which calls ccache. The wrapper and my patch to ccache is at http://raoulhl.dyndns.org/~steve/gcc-wrapper-0.1.tar.gz

Check the Makefile to make sure the paths it chooses for the moved binaries and to ccache are okay before you use it. Also note that my patch dumps a bit more information to the ccache log than necessary.

If anyone can explain the bizarre precompiled header behavior, I'd be most grateful.

- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Prev by Date: Re: what's supposed to get [dead] stripped?
  • Next by Date: Re: File not found
  • Previous by thread: Re: what's supposed to get [dead] stripped?
  • Next by thread: Re: Xcode and ccache
  • Index(es):
    • Date
    • Thread