[ccache] base_dir and -Xclang option - bug or incompleteness?
Michael Kolomeytsev
michael.kolomeytsev at gmail.com
Wed Mar 23 16:56:16 UTC 2016
Hi,
I have two copies of the same project and use base_dir option to share
cache between them.
And everything works fine until there are such options in command line:
... -Xclang -load -Xclang /project1/path/libFindBadConstructs.so ...
The path to the libFindBadConstructs.so is slightly different:
/project1/path/libFindBadConstructs.so or
/project2/path/libFindBadConstructs.so.
And currently ccache generates two different hashes/manifests and there is
no cache sharing unfortunately :(
I looked into the ccache source code.
https://github.com/jrosdahl/ccache/blob/master/ccache.c#L1696 - that
special Xlang options processing is exactly what I need. But it doesn't
work 'cause "i+=3" is forgotten before the "continue"?
Or should we add hashes for that options but "make_relative_path" for a
path to a plugin?
It seems replacing TAKE_ARG with TAKE_PATH in compopt.c for "Xclang" is
enough.
https://github.com/jrosdahl/ccache/blob/master/compopt.c#L53
I can fix it if someone will say what fix is better.
More information about the ccache
mailing list