diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-07 07:01:54 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-07 07:01:54 +0530 |
commit | d16ba51b4722a84f69976ca8679af672495248c8 (patch) | |
tree | 785e5f7bc1dbd1b1897dbcd3f8b5795aa94287af /python/servo/build_commands.py | |
parent | faf2f34772fe06396a7b8542b00f0566832bc7ef (diff) | |
parent | e0ea1e09b3f715f44089c9f1c384f162138024e6 (diff) | |
download | servo-d16ba51b4722a84f69976ca8679af672495248c8.tar.gz servo-d16ba51b4722a84f69976ca8679af672495248c8.zip |
Auto merge of #8366 - larsbergstrom:ccache, r=frewsxcv
Add CCACHE infra and turn it on in travis
r? @Manishearth
This lets devs configure their use of CCACHE with their .servobuild file, as usual. For build environments, they can either have a .servobuild file or set the CCACHE env var to point at the ccache binary to use.
It also adds support for ccache to our travis builds. Buildbot will come in a separate commit to the saltfs repo.
It is expected that the various cargo makefiles will look at this variable and do the "right thing" to tell their native build to instead use ccache. e.g., https://github.com/servo/mozjs/pull/62
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8366)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 3 |
1 files changed, 3 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) |