Skip to content

Commit

Permalink
Restore the ability to disable incremental compilation
Browse files Browse the repository at this point in the history
It became the default in debug mode in the last Rust/Cargo update.
  • Loading branch information
SimonSapin committed Jan 14, 2018
1 parent 7b92eb9 commit fe0d286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/servo/command_base.py
Expand Up @@ -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", {})
Expand Down Expand Up @@ -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":
Expand Down
4 changes: 3 additions & 1 deletion servobuild.example
Expand Up @@ -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
Expand Down

0 comments on commit fe0d286

Please sign in to comment.