Hi Francois,

Couple of quick comments:

Let me explain why I encountered this problem.  I wanted to feed the
pre-processed source code to a tool and the easiest way to generate the
pre-processor output was to use -save-temps while building it.  However,
I did not want to build multiple times (because I was changing a bunch
of options, excluding some modules etc.), so I sticked ccache in.

On 08/09/09 12:10 +1200, Francois Marier said ...
> I've had a quick look at this and it looks like ccache is swallowing that
> argument.
> 
> I guess there's two ways we could fix that:
> 
>   1- actually retain the argument
>   2- disable ccache caching when that argument is present

I am not too sure about this, but don't you think going this way may be
a bit counter-productive to ccache's usage?  In particular, my use case
above.

> The problem I see with option 1 is that it might involve caching these extra
> files too, which sounds like a bit of work patch-wise.

Or rather, we don't delete the temporary pre-processor file.  I did not
look at the code too much but we shouldn't have to cache this file also.

> Option 2 is obviously the easy one.

Wouldn't another option be to add a retain_i_file variable (default 0)
and set it to 1 in case -save-temps is present?  I don't know if this
would be "special casing" too much, but we special case a lot of options
in process_args already.

I will try and submit a patch towards the weekend.

Cheers,

Giridhar

-- 
Y Giridhar Appaji Nag | http://appaji.net/

Attachment: signature.asc
Description: Digital signature

Reply via email to