Option configuration to enable incremental compilation.

https://internals.rust-lang.org/t/incremental-compilation-beta/4721
This commit is contained in:
Simon Sapin 2017-02-05 14:45:00 +01:00
parent 97cc71b661
commit e273ecce4c
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("debug-mozjs", False)
self.config["build"].setdefault("ccache", "") self.config["build"].setdefault("ccache", "")
self.config["build"].setdefault("rustflags", "") self.config["build"].setdefault("rustflags", "")
self.config["build"].setdefault("incremental", False)
self.config.setdefault("android", {}) self.config.setdefault("android", {})
self.config["android"].setdefault("sdk", "") 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["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"])
env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"] env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"]
if self.config["build"]["incremental"]:
env["CARGO_INCREMENTAL"] = "1"
if extra_lib: if extra_lib:
if sys.platform == "darwin": 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. # or Set "mode = release" or use `mach build --release` for optimized build.
# Defaults to prompting before building # Defaults to prompting before building
#mode = "dev" #mode = "dev"
# Set "android = true" or use `mach build --android` to build the Android app. # Set "android = true" or use `mach build --android` to build the Android app.
android = false android = false
# Set "debug-mozjs" or use `mach build --debug-mozjs` to build a debug spidermonkey. # Set "debug-mozjs" or use `mach build --debug-mozjs` to build a debug spidermonkey.
debug-mozjs = false debug-mozjs = false
# Set to the path to your ccache binary to enable caching of compiler outputs # Set to the path to your ccache binary to enable caching of compiler outputs
#ccache = "/usr/local/bin/ccache" #ccache = "/usr/local/bin/ccache"
# Any optional flags that will be added to $RUSTFLAGS # Any optional flags that will be added to $RUSTFLAGS
#rustflags = "" #rustflags = ""
# Enable rustcs incremental compilation
#incremental = false
# Android information # Android information
[android] [android]
# Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively # Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively