From af1edaa8830f7b68a645374c912d1874796315cd Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 16 Mar 2017 21:59:07 +0100 Subject: [PATCH] Fix "option `Z` is unstable" warning on geckolib with incremental=true `incremental = true` can be set in the `[build]` section of `.servobuild` to enable incremental compilation. In `./mach build-geckolib`, which uses a stable version of the compiler, this would cause a warning repeated for each invocation of rustc: ``` warning: the option `Z` is unstable and should only be used on the nightly compiler, but it is currently accepted for backwards compatibility; this will soon change, see issue #31847 for more details ``` This PR disables incremental compilation for `build-geckolib`, regardless of `.servobuild` settings. --- python/servo/command_base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 34ce2bfc682..4ee5819ee57 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -296,6 +296,11 @@ class CommandBase(object): if not self.config["tools"]["system-rust"]: self.config["tools"]["rust-root"] = path.join( self.context.sharedir, "rust", self.rust_path()) + if use_stable_rust: + # Cargo maintainer's position is that CARGO_INCREMENTAL is a nightly-only feature + # and should not be used on the stable channel. + # https://github.com/rust-lang/cargo/issues/3835 + self.config["build"]["incremental"] = False def use_stable_rust(self): return self._use_stable_rust