aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-02-17 02:04:44 -0800
committerGitHub <noreply@github.com>2017-02-17 02:04:44 -0800
commit1afae52c47e754c6573f4a8b72fcc2e6994d253f (patch)
tree3393b43158c048767b8cf6d13faa2e76e914cf9a /python/servo/command_base.py
parent08cb09b2a09aa153454b137c4e9ea2ec82dc3cf8 (diff)
parent8bc9f0ed850686b9ca48612f7297c5048e3b3093 (diff)
downloadservo-1afae52c47e754c6573f4a8b72fcc2e6994d253f.tar.gz
servo-1afae52c47e754c6573f4a8b72fcc2e6994d253f.zip
Auto merge of #15564 - servo:no-gods-no-masters-no-assertions, r=Ms2ger
Disable LLVM assertions by default, on supported platforms <!-- Please describe your changes on the following line: --> https://github.com/servo/servo/pull/15559#issuecomment-280003926 > With an empty incremental compilation cache (or, presumably, with incremental compilation disabled), LLVM assertions add 16% to the compilation time in debug mode, 53% (!) in release mode. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #15548 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15564) <!-- Reviewable:end -->
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 5ad351b3411..34ce2bfc682 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -23,7 +23,7 @@ from mach.registrar import Registrar
import toml
from servo.packages import WINDOWS_MSVC as msvc_deps
-from servo.util import host_triple
+from servo.util import host_triple, host_platform
BIN_SUFFIX = ".exe" if sys.platform == "win32" else ""
@@ -263,10 +263,15 @@ class CommandBase(object):
context.sharedir, "cargo", self.cargo_build_id())
self.config["tools"].setdefault("rustc-with-gold", get_env_bool("SERVO_RUSTC_WITH_GOLD", True))
+ # https://github.com/rust-lang/rust/pull/39754
+ platforms_with_rustc_alt_builds = ["unknown-linux-gnu", "apple-darwin", "pc-windows-msvc"]
+ llvm_assertions_default = ("SERVO_RUSTC_LLVM_ASSERTIONS" in os.environ
+ or host_platform() not in platforms_with_rustc_alt_builds)
+
self.config.setdefault("build", {})
self.config["build"].setdefault("android", False)
self.config["build"].setdefault("mode", "")
- self.config["build"].setdefault("llvm-assertions", True)
+ self.config["build"].setdefault("llvm-assertions", llvm_assertions_default)
self.config["build"].setdefault("debug-mozjs", False)
self.config["build"].setdefault("ccache", "")
self.config["build"].setdefault("rustflags", "")