aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-02-15 14:55:44 +0100
committerSimon Sapin <simon.sapin@exyr.org>2017-02-16 08:38:14 +0100
commitbd8ec03740408d97263e479c7d37dee6fe339a8f (patch)
treee7b45c4420c678a5a9469652440f0c41319d9646 /python
parent4f10a0f2e1ae545649957cc7e305c8cb81312759 (diff)
downloadservo-bd8ec03740408d97263e479c7d37dee6fe339a8f.tar.gz
servo-bd8ec03740408d97263e479c7d37dee6fe339a8f.zip
Disable LLVM assertions by default, on supported platforms.
But keep them on linux-dev CI.
Diffstat (limited to 'python')
-rw-r--r--python/servo/command_base.py9
-rw-r--r--python/servo/util.py6
2 files changed, 12 insertions, 3 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", "")
diff --git a/python/servo/util.py b/python/servo/util.py
index 03f993b3bf0..77fba165446 100644
--- a/python/servo/util.py
+++ b/python/servo/util.py
@@ -20,7 +20,7 @@ import zipfile
import urllib2
-def host_triple():
+def host_platform():
os_type = platform.system().lower()
if os_type == "linux":
os_type = "unknown-linux-gnu"
@@ -42,7 +42,11 @@ def host_triple():
os_type = "unknown-freebsd"
else:
os_type = "unknown"
+ return os_type
+
+def host_triple():
+ os_type = host_platform()
cpu_type = platform.machine().lower()
if os_type.endswith("-msvc"):
# vcvars*.bat should set it properly