Re: [ccache] @file arguments to ccache - Intel Compiler
> > 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
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