Restore the ability to disable incremental compilation

It became the default in debug mode in the last Rust/Cargo update.
This commit is contained in:
Simon Sapin 2018-01-14 01:38:37 +01:00
parent 7b92eb932b
commit fe0d2866f1
2 changed files with 6 additions and 2 deletions

View file

@ -278,7 +278,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["build"].setdefault("incremental", None)
self.config["build"].setdefault("thinlto", False)
self.config.setdefault("android", {})
@ -439,6 +439,8 @@ class CommandBase(object):
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":

View file

@ -40,8 +40,10 @@ debug-mozjs = false
# Any optional flags that will be added to $RUSTFLAGS
#rustflags = ""
# Enable rustcs incremental compilation
# Enable or disable rustcs incremental compilation
# The default is enabled in debug mode only.
#incremental = false
#incremental = true
# Whether to use ThinLTO or not
#thinlto = false