From 8306891807c88241b56543a38dd074ba6f7eeaa2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 25 Apr 2023 14:27:45 -0400 Subject: [PATCH] jjb: binutils-gdb: use ccache 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 --- scripts/binutils-gdb/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/binutils-gdb/build.sh b/scripts/binutils-gdb/build.sh index c8fbc70..5547530 100755 --- a/scripts/binutils-gdb/build.sh +++ b/scripts/binutils-gdb/build.sh @@ -134,6 +134,8 @@ export TMPDIR 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 @@ -148,6 +150,10 @@ esac print_os || true print_tooling || true +if use_ccache; then + ccache -c +fi + # Enter the source directory cd "$SRCDIR" -- 2.34.1