Eric Chamberland wrote: > We are happy using ccache with clang but I just discovered today that > ccache hides documentation warnings! [...] > My CC* environment variables: > > CCACHE_SLOPPINESS=include_file_mtime > CCACHE_DIR=/home/ccache/cmpbib/ccache > CCACHE_CPP2=yes > CCACHE_HARDLINK=1 > CCACHE_HASHDIR= > > How can I retrieve the documentation warnings with ccache? Do I do > something wrong?
Hmm, since you are using CCACHE_CPP2=1 you *should* be getting source-level warnings too. However, if you cached the previous result without using that setting (CCACHE_CPP2) you could still get the cached results, i.e. the one without the extra warnings. But it is strange because CCACHE_CPP2 should be in the hash now. Could be a bug with direct mode perhaps, that it never runs cpp. It only looks at the (unchanged) files, and returns the cache... If you clear the cache (or CCACHE_NODIRECT=1), does it remain ? I can reproduce your problem without CCACHE_CPP2 (due to the .ii) but I cannot reproduce it with CCACHE_CPP2 (when using the .cc) ? Your suggestion to use -C with the -E is interesting, though you would still get your macros expanded in warnings - and such*. * http://peter.eisentraut.org/blog/2014/12/01/ccache-and-clang-part-3/ So maybe only keeping comments is not enough, full source is needed ? And maybe how to use ccache with clang should be better documented ? It was only recently that the clang tests were fixed (396df7e), so it seems like most developers are using gcc - and thus that is assumed. I think we will see more things like this with GCC 5 (and later) too, so some extra lines about source-level warnings are probably needed... For now, the best workaround here is the "run_second_cpp" config. /Anders _______________________________________________ ccache mailing list email@example.com https://lists.samba.org/mailman/listinfo/ccache