Auto merge of #15390 - servo:opt-in-incremental, r=nox

Option configuration to enable incremental compilation.

https://internals.rust-lang.org/t/incremental-compilation-beta/4721

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15390)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-05 06:07:13 -08:00 committed by GitHub
commit fc37ba9584
2 changed files with 10 additions and 0 deletions

View file

@ -270,6 +270,7 @@ class CommandBase(object):
self.config["build"].setdefault("debug-mozjs", False)
self.config["build"].setdefault("ccache", "")
self.config["build"].setdefault("rustflags", "")
self.config["build"].setdefault("incremental", False)
self.config.setdefault("android", {})
self.config["android"].setdefault("sdk", "")
@ -427,6 +428,8 @@ class CommandBase(object):
env["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"])
env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"]
if self.config["build"]["incremental"]:
env["CARGO_INCREMENTAL"] = "1"
if extra_lib:
if sys.platform == "darwin":

View file

@ -38,15 +38,22 @@ rustc-with-gold = true
# or Set "mode = release" or use `mach build --release` for optimized build.
# Defaults to prompting before building
#mode = "dev"
# Set "android = true" or use `mach build --android` to build the Android app.
android = false
# Set "debug-mozjs" or use `mach build --debug-mozjs` to build a debug spidermonkey.
debug-mozjs = false
# Set to the path to your ccache binary to enable caching of compiler outputs
#ccache = "/usr/local/bin/ccache"
# Any optional flags that will be added to $RUSTFLAGS
#rustflags = ""
# Enable rustcs incremental compilation
#incremental = false
# Android information
[android]
# Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively