Re: [ccache] @file arguments to ccache - Intel Compiler

2015-10-20 Thread Joel Rosdahl
>
> I was wondering why in ccache we are expanding @file
>
> https://github.com/venkrao/ccache-1/blob/59e5244dd79b0fc7df682c8f3c05b778a3d00f91/ccache.c#L1951


@file is expanded so that ccache can inspect the options in the file just
like options given on the command line. The alternative is to not expand
@file arguments and instead just fall back to running the compiler without
caching. (This was how ccache behaved before support for @file was added in
2012, see commit 0da6ddc169f1edfcfb1c37d8aa45c4257cf6c5c5.)

Essentially, the arguments that are to be listed in @file are those that affect
> the preprocessor.


How do you come to that conclusion? @file can, at least for GCC, contain
any options.

So, is it safe to just pass on the @file as-is to compiler, without
letting ccache
> read and expand the arguments?


In general: no.

I'm unable to decide how to go about supporting Intel compiler, especially with
> the @file. Intel compiler apparently even accepts special char like
> hello.h$ or regex based input args inside the @file which might make
> ccache handle them more difficult.


Well, if you want to use ccache with the Intel compiler, don't put comments
and other non-GCC-compatible stuff in @files. :-) But perhaps it would be
possible to parse @files in a way that is backward compatible with how GCC
works?

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] @file arguments to ccache - Intel Compiler

2015-10-17 Thread vkr
Hello,
I was wondering why in ccache we are expanding @file
https://github.com/venkrao/ccache-1/blob/59e5244dd79b0fc7df682c8f3c05b778a3d00f91/ccache.c#L1951
Essentially, the arguments that are to be listed in @file are those that
affect the preprocessor.

Is it safe to just not expand the arguments onto the commandline via ccache
function above,
but, just pass on the @file argument as-is to the compiler command-line?

The reason I'm asking this is, Intel compiler, apparently accepts shell
comments(# comments) inside the .cfg file, as well as new line characters.
And as far as my test results reveal, those fail ccache, as we do not care
filtering our the shell comments inside ccache,
instead, read the entire file content and put it into the command-line, and
this results in "Preprocessor error"

So, is it safe to just pass on the @file as-is to compiler, without letting
ccache read and expand the arguments?

I can think of a bad case, where the user puts in an absolute path -I path
inside the @file, and that results in cache miss in direct mode..

I'm unable to decide how to go about supporting Intel compiler, especially
with the @file. Intel compiler apparently even accepts special char like
hello.h$
or regex based input args inside the @file which might make ccache handle
them more difficult.

Regards,
Venkat.
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] Intel compiler

2003-12-02 Thread tri...@samba.org
> Or perhaps ccache should just cache stdout.  distcc sends it across
> the network alongside stderr. 
> 
> I'm not sure why writing to stdout forces a cache miss.

It's because is also very hard to accurately cache both stderr and
stdout because of the timing of lines between them. To really
accurately cache them ccache would need to record not only what came
out of stdout and stderr, but exactly what order the lines came in, so
when it is replayed the output looks the same.

I'd be happy to add a CCACHE_IGNORE_STDOUT option which would help for
the intel compiler. I'm not convinced it is really worth actually
cacheing stdout, as the output will probably look pretty strange if we
just put all the stdout at the start or end.

Cheers, Tridge


[ccache] Intel compiler

2003-12-02 Thread Martin Pool
On 17 Feb 2003, Anders Furuhed  wrote:
> I'm considering whether to make a patch for our own use that accepts
> a parameterized CCACHE_WHATEVER regexp that is used to filter the
> stdout result before deciding not to cache. 

Or perhaps ccache should just cache stdout.  distcc sends it across
the network alongside stderr. 

I'm not sure why writing to stdout forces a cache miss.

-- 
Martin 


[ccache] Intel compiler

2003-12-02 Thread Anders Furuhed
I was just about to start using ccache with distcc and didn't know the best way 
to go about, only to discover a just-in-time release that makes it easy! Thanks!

Last week we started to use the Intel compiler in parallel with gcc. The Intel 
compilers produce a number of cool but unnecessary messages about optimizations 
that take place. Some of these messages can't be turned off and they appear on 
stdout. The result is that ccache discards the result instead of putting it 
into the cache. The Intel guys said they would consider introducing an option 
that turns the remarks off. I'm considering whether to make a patch for our own 
use that accepts a parameterized CCACHE_WHATEVER regexp that is used to filter 
the stdout result before deciding not to cache. There's no way we will let 
something get in the way of us and ccache :). However, it feels like a 
temporary workaround rather than a nice feature to push for inclusion. If 
someone has an opinion or wants to have a patch, please mail me (I'm subscribed 
to the list).

Thanks again for today's release!
Anders