Skip to content

Commit

Permalink
doc,win: add ccache support
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanStojanovic committed Jan 23, 2025
1 parent c8cfd04 commit 414863d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,20 @@ export CC="ccache cc" # add to ~/.zshrc or other shell config file
export CXX="ccache c++" # add to ~/.zshrc or other shell config file
```

On Windows:

Tips: follow <https://github.com/ccache/ccache/wiki/MS-Visual-Studio>, and you
should notice that obj file will be bigger the normal one.

First, install ccache, assume ccache install to c:\ccache, copy
c:\ccache\ccache.exe to c:\ccache\cl.exe

When building Node.js provide a path to your ccache via the option

```powershell
.\vcbuild.bat ccache c:\ccache\
```

This will allow for near-instantaneous rebuilds when switching branches back
and forth that were built with cache.

Expand Down

0 comments on commit 414863d

Please sign in to comment.