Attempt to get reuse of common code from multiple clones in different directories.
auto merge of #6836 : pnkfelix/rust/fsk-issue6805-ccache-rewrite-basedir, r=catamorphism

Attempt to get reuse of common object code from multiple clones in different directories.

This is a followup to issue #6805.