improve ccache support

Change-Id: I5401f7068d6f830adba293eadbbe307e6bf736f8
fix graphite optimization support

Change-Id: Ifa79b8714559d5d8710aaa6a17e9b26ffd226304