diff --git a/python/servo/command_base.py b/python/servo/command_base.py index bfc7192df973..b58ac21807fa 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -278,7 +278,7 @@ def resolverelative(category, key): 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["build"].setdefault("incremental", None) self.config["build"].setdefault("thinlto", False) self.config.setdefault("android", {}) @@ -439,6 +439,8 @@ def package_dir(package): if self.config["build"]["incremental"]: env["CARGO_INCREMENTAL"] = "1" + elif self.config["build"]["incremental"] is not None: + env["CARGO_INCREMENTAL"] = "0" if extra_lib: if sys.platform == "darwin": diff --git a/servobuild.example b/servobuild.example index 98dd8edaf9ce..a328e24725e0 100644 --- a/servobuild.example +++ b/servobuild.example @@ -40,8 +40,10 @@ debug-mozjs = false # Any optional flags that will be added to $RUSTFLAGS #rustflags = "" -# Enable rustc’s incremental compilation +# Enable or disable rustc’s incremental compilation +# The default is enabled in debug mode only. #incremental = false +#incremental = true # Whether to use ThinLTO or not #thinlto = false