Skip to content

Commit 931780c

Browse files
committed
Add option --use-ccache for faster (re)builds
1 parent 6f5bf08 commit 931780c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/automate.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
[--gyp-msvs-version MSVS]
3636
[--use-system-freetype USE_SYSTEM_FREETYPE]
3737
[--use-gtk3 USE_GTK3]
38+
[--use-ccache USE_CCACHE]
3839
[--no-depot-tools-update NO_DEPOT_TOOLS_UPDATE]
3940
automate.py (-h | --help) [type -h to show full description for options]
4041
@@ -68,6 +69,7 @@
6869
--gyp-msvs-version=<v> Set GYP_MSVS_VERSION.
6970
--use-system-freetype Use system Freetype library on Linux (Issue #402)
7071
--use-gtk3 Link CEF with GTK 3 libraries (Issue #446)
72+
--use-ccache Use ccache for faster (re)builds
7173
--no-depot-tools-update Do not update depot_tools/ directory. When
7274
building old unsupported versions of Chromium
7375
you want to manually checkout an old version
@@ -116,6 +118,7 @@ class Options(object):
116118
gyp_msvs_version = "" # env variables are being used.
117119
use_system_freetype = False
118120
use_gtk3 = False
121+
use_ccache = False
119122
no_depot_tools_update = False
120123

121124
# Internal options
@@ -906,6 +909,10 @@ def getenv():
906909
if Options.use_gtk3:
907910
env["GN_DEFINES"] += " use_gtk3=true"
908911

912+
# Use ccache for faster (re)builds
913+
if Options.use_ccache:
914+
env["GN_DEFINES"] += " cc_wrapper=ccache"
915+
909916
# To perform an official build set GYP_DEFINES=buildtype=Official.
910917
# This will disable debugging code and enable additional link-time
911918
# optimizations in Release builds.

0 commit comments

Comments
 (0)