servo: Merge #19633 - pass -vv through mach to cargo (from tigercosmos:vv); r=emilio

<!-- Please describe your changes on the following line: -->
base on #17237, which is reviewed by emilio and jdm.
just need to rename commit and rebase

---
<!-- 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 #17231 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c07f31a55e3d6f156e8fa8360eb804f323a0cb1

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 80c479fc7627f27e21df34ffd61edf4aed7c6dae
This commit is contained in:
tigercosmos 2017-12-24 12:39:34 -06:00
Родитель 691ff85bf1
Коммит 20148744de
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -167,6 +167,9 @@ class MachCommands(CommandBase):
@CommandArgument('--verbose', '-v', @CommandArgument('--verbose', '-v',
action='store_true', action='store_true',
help='Print verbose output') help='Print verbose output')
@CommandArgument('--very-verbose', '-vv',
action='store_true',
help='Print very verbose output')
@CommandArgument('params', nargs='...', @CommandArgument('params', nargs='...',
help="Command-line arguments to be passed through to Cargo") help="Command-line arguments to be passed through to Cargo")
@CommandArgument('--with-debug-assertions', @CommandArgument('--with-debug-assertions',
@ -174,8 +177,8 @@ class MachCommands(CommandBase):
action='store_true', action='store_true',
help='Enable debug assertions in release') help='Enable debug assertions in release')
def build(self, target=None, release=False, dev=False, jobs=None, def build(self, target=None, release=False, dev=False, jobs=None,
features=None, android=None, verbose=False, debug_mozjs=False, params=None, features=None, android=None, verbose=False, very_verbose=False,
with_debug_assertions=False): debug_mozjs=False, params=None, with_debug_assertions=False):
opts = params or [] opts = params or []
opts += ["--manifest-path", self.servo_manifest()] opts += ["--manifest-path", self.servo_manifest()]
@ -223,6 +226,8 @@ class MachCommands(CommandBase):
opts += ["-j", jobs] opts += ["-j", jobs]
if verbose: if verbose:
opts += ["-v"] opts += ["-v"]
if very_verbose:
opts += ["-vv"]
if android: if android:
target = self.config["android"]["target"] target = self.config["android"]["target"]