Use ccache to speed up builds when possible.
We have witnessed that the ccache mechanism to regulate the cache size
didn't work under Jenkins for some reason, causing the cache directory
to grow indefinitely. Run `ccache -c` at the start of each job to force
ccache to do some cleanup and ensure the cache is not over the allowed
size.
Change-Id: I54698ed5ed7b4fd8b416f9864d33d5aae2d67ecd
export CFLAGS="-O2 -fsanitize=address"
export CXXFLAGS="-O2 -fsanitize=address -D_GLIBCXX_DEBUG=1"
export LDFLAGS="-fsanitize=address"
+export CC="ccache cc"
+export CXX="ccache c++"
# Set platform variables
case "$platform" in
print_os || true
print_tooling || true
+if use_ccache; then
+ ccache -c
+fi
+
# Enter the source directory
cd "$SRCDIR"