From 32c721e640289e7eb28b07d7e05c4467a4ca3d39 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 18 Dec 2014 11:15:42 +0000 Subject: Have 'mach build' pass arbitrary arguments to Cargo. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Duplicating all of Cargo’s argument parsing in mach is silly. --- python/servo/build_commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index a283b0d6c91..540c0f1601b 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -38,14 +38,16 @@ class MachCommands(CommandBase): @CommandArgument('--verbose', '-v', action='store_true', help='Print verbose output') + @CommandArgument('params', nargs='...', + help="Command-line arguments to be passed through to Cargo") def build(self, target=None, release=False, jobs=None, android=None, - verbose=False, debug_mozjs=False): + verbose=False, debug_mozjs=False, params=None): self.ensure_bootstrapped() if android is None: android = self.config["build"]["android"] - opts = [] + opts = params or [] features = [] if release: -- cgit v1.2.3