From e273ecce4ca3f90d75a7b185de5e03af97da5d96 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 5 Feb 2017 14:45:00 +0100 Subject: [PATCH] Option configuration to enable incremental compilation. https://internals.rust-lang.org/t/incremental-compilation-beta/4721 --- python/servo/command_base.py | 3 +++ servobuild.example | 7 +++++++ 2 files changed, 10 insertions(+) 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