diff --git a/python/servo/command_base.py b/python/servo/command_base.py index e80c9cb018b..8149a705014 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -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": diff --git a/servobuild.example b/servobuild.example index a037c80a863..1cf444f57aa 100644 --- a/servobuild.example +++ b/servobuild.example @@ -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 rustc’s incremental compilation +#incremental = false + # Android information [android] # Defaults to the value of $ANDROID_SDK, $ANDROID_NDK, $ANDROID_TOOLCHAIN, $ANDROID_PLATFORM respectively