diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-07-16 11:51:10 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-07-16 17:08:28 +0200 |
commit | 6ef56dac2bdc11e8ecfc0e8ae2d0730c7db8edf0 (patch) | |
tree | 4e403919c3c8a9e1c3f40a2b0f75d75e2248d0c6 /python/servo/build_commands.py | |
parent | a6f403c5f2714e2cfe92c1dc7b6760d6d37e614d (diff) | |
download | servo-6ef56dac2bdc11e8ecfc0e8ae2d0730c7db8edf0.tar.gz servo-6ef56dac2bdc11e8ecfc0e8ae2d0730c7db8edf0.zip |
Android: run ./mach package implicitly after ./mach build by default
The result of `./mach build` for Android is a `.so` file
that cannot be used on its own, so running build without package
is presumably never useful.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 02d71eee8bd..13d31c7ac8a 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -23,6 +23,7 @@ from mach.decorators import ( CommandProvider, Command, ) +from mach.registrar import Registrar from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX from servo.util import host_triple @@ -160,6 +161,9 @@ class MachCommands(CommandBase): default=None, action='store_true', help='Build for Android') + @CommandArgument('--no-package', + action='store_true', + help='For Android, disable packaging into a .apk after building') @CommandArgument('--debug-mozjs', default=None, action='store_true', @@ -177,7 +181,7 @@ class MachCommands(CommandBase): action='store_true', help='Enable debug assertions in release') def build(self, target=None, release=False, dev=False, jobs=None, - features=None, android=None, verbose=False, very_verbose=False, + features=None, android=None, no_package=False, verbose=False, very_verbose=False, debug_mozjs=False, params=None, with_debug_assertions=False): opts = params or [] @@ -357,6 +361,10 @@ class MachCommands(CommandBase): # Do some additional things if the build succeeded if status == 0: + if android and not no_package: + Registrar.dispatch("package", context=self.context, + release=release, dev=dev, target=target) + if sys.platform == "win32": servo_exe_dir = path.join(base_path, "debug" if dev else "release") |