Auto merge of #21825 - jdm:backtrace-helpers, r=Manishearth

Optional backtraces for JS errors and WebGL errors

This adds two new build-time features to enable useful debugging tools when investigating why JS and WebGL content isn't working. They're optional because they're quite heavyweight.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they're optional developer features.

<!-- 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/21825)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-10-02 06:57:38 -04:00 committed by GitHub
commit 57053e03bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 131 additions and 16 deletions

View file

@ -264,6 +264,11 @@ class MachCommands(CommandBase):
if debug_mozjs:
features += ["debugmozjs"]
if self.config["build"]["webgl-backtrace"]:
features += ["webgl-backtrace"]
if self.config["build"]["dom-backtrace"]:
features += ["dom-backtrace"]
if features:
opts += ["--features", "%s" % ' '.join(features)]

View file

@ -288,6 +288,8 @@ class CommandBase(object):
self.config["build"].setdefault("rustflags", "")
self.config["build"].setdefault("incremental", None)
self.config["build"].setdefault("thinlto", False)
self.config["build"].setdefault("webgl-backtrace", False)
self.config["build"].setdefault("dom-backtrace", False)
self.config.setdefault("android", {})
self.config["android"].setdefault("sdk", "")