mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -537,6 +537,9 @@ class CommandBase(object):
|
|||
if os.path.isdir(default):
|
||||
env.setdefault(f"ANDROID_{kind.upper()}_ROOT", default)
|
||||
|
||||
if "IN_NIX_SHELL" in env and ("ANDROID_NDK_ROOT" not in env or "ANDROID_SDK_ROOT" not in env):
|
||||
print("Please set SERVO_ANDROID_BUILD=1 when starting the Nix shell to include the Android SDK/NDK.")
|
||||
sys.exit(1)
|
||||
if "ANDROID_NDK_ROOT" not in env:
|
||||
print("Please set the ANDROID_NDK_ROOT environment variable.")
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue