Skip to content

Setup gclient cache and ccache#161

Open
mrdimidium wants to merge 1 commit into
forkfrom
wp/mrdimidium/build-cache
Open

Setup gclient cache and ccache#161
mrdimidium wants to merge 1 commit into
forkfrom
wp/mrdimidium/build-cache

Conversation

@mrdimidium

Copy link
Copy Markdown
Contributor

Adds a cache for gclient sync and ccache for V8 compilation. Flags are disabled by default.

Try locally:

# clenup build directory
rm -rf .lp-cache .zig-cache zig-out

# Build and warmup cache
zig build -Dgit_cache_dir="$HOME/.cache/gclient" -Dcc_wrapper="ccache"

# check that cache exists
du -sh ~/.cache/gclient
du -sh ~/.cache/ccache
ccache -s

# remove build in v8 dir and build again with cache
rm -rf .lp-cache .zig-cache zig-out
zig build -Dgit_cache_dir="$HOME/.cache/gclient" -Dcc_wrapper="ccache"

@krichprollsch

Copy link
Copy Markdown
Member

Looks nice, but when removing .lp-cache the 2nd build, I still had the Bootstrapping V8 14.0.365.4 in /tmp/zig-v8-fork/.lp-cache/v8-14.0.365.4 (this will take a while)... step to do.
I guess it's expected?
After he cache worked in the same clone dir.

But I tested to build using zig build -Dgit_cache_dir="$HOME/.cache/gclient" -Dcc_wrapper="ccache" with a fresh clone, and it missed the cache to make a full rebuild. Any idea why?

@krichprollsch

Copy link
Copy Markdown
Member

@mrdimidium would you like to rebase this one please?

@mrdimidium mrdimidium force-pushed the wp/mrdimidium/build-cache branch from 0d93784 to 27ef19a Compare April 8, 2026 07:45
@mookums

mookums commented May 7, 2026

Copy link
Copy Markdown
Contributor

Are we still planning on merging this? cc_wrapper would be nice.

@mrdimidium mrdimidium force-pushed the wp/mrdimidium/build-cache branch from 27ef19a to 49ea681 Compare May 7, 2026 15:46
@mrdimidium mrdimidium requested a review from mookums May 7, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants