mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Make Android build optional on Nix (#31231)
* Make Android build optional on Nix I want to build Servo without also installing the entire Android SDK. This makes it so Android support is only built if `buildAndroid` is true. Signed-off-by: syvb <me@iter.ca> * Add Android support to nix-shell if SERVO_ANDROID_BUILD set --------- Signed-off-by: syvb <me@iter.ca>
This commit is contained in:
parent
92af41cfeb
commit
f27227b1db
3 changed files with 19 additions and 13 deletions
3
mach
3
mach
|
@ -36,10 +36,11 @@ if __name__ == '__main__':
|
|||
import subprocess
|
||||
from shlex import quote
|
||||
mach_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
build_android_args = ['--arg', 'buildAndroid', 'true'] if 'SERVO_ANDROID_BUILD' in os.environ else []
|
||||
print('NOTE: Entering nix-shell etc/shell.nix')
|
||||
try:
|
||||
# sys argv already contains the ./mach part, so we just need to pass it as-is
|
||||
result = subprocess.run(['nix-shell', mach_dir + '/etc/shell.nix', '--run', ' '.join(map(quote, sys.argv))])
|
||||
result = subprocess.run(['nix-shell', mach_dir + '/etc/shell.nix'] + build_android_args + ['--run', ' '.join(map(quote, sys.argv))])
|
||||
sys.exit(result.returncode)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue