aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/build_commands.py3
-rw-r--r--python/servo/command_base.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index ad901ba0fd4..c2f7381e7ac 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -232,6 +232,9 @@ class MachCommands(CommandBase):
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
env['OPENSSL_STATIC'] = 'TRUE'
+ if not (self.config["build"]["ccache"] == ""):
+ env['CCACHE'] = self.config["build"]["ccache"]
+
status = call(
["cargo", "build"] + opts,
env=env, cwd=self.servo_crate(), verbose=verbose)
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 14f8dff0c6f..4ceb5c629f4 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -107,6 +107,7 @@ class CommandBase(object):
self.config["build"].setdefault("android", False)
self.config["build"].setdefault("mode", "")
self.config["build"].setdefault("debug-mozjs", False)
+ self.config["build"].setdefault("ccache", "")
self.config.setdefault("android", {})
self.config["android"].setdefault("sdk", "")