Commit 77e5316a by Jiajie Hu Committed by Commit Bot

Pull in Android-only dependencies behind a condition

In crrev.com/c/1866080, catapult and android_ndk were added for supporting standalone Android builds, which increased ANGLE's fresh checkout time and disk occupation a lot. For ANGLE embedders, this can be mitigated by putting them behind a condition, where checkout_android is a builtin variable controlled by target_os in the .gclient file. For standalone builds on Linux, Android will be added to target_os by default for compatibility with previous behavior. Bug: None Change-Id: I0b258c6fc7f62ca65e705b8c31c9ace5dffd4030 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2216709Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jiajie Hu <jiajie.hu@intel.com>
parent 5891b091
...@@ -245,12 +245,12 @@ deps = { ...@@ -245,12 +245,12 @@ deps = {
'third_party/catapult': { 'third_party/catapult': {
'url': '{chromium_git}/catapult.git@{catapult_revision}', 'url': '{chromium_git}/catapult.git@{catapult_revision}',
'condition': 'not build_with_chromium', 'condition': 'checkout_android and not build_with_chromium',
}, },
'third_party/android_ndk': { 'third_party/android_ndk': {
'url': '{chromium_git}/android_ndk.git@27c0a8d090c666a50e40fceb4ee5b40b1a2d3f87', 'url': '{chromium_git}/android_ndk.git@27c0a8d090c666a50e40fceb4ee5b40b1a2d3f87',
'condition': 'not build_with_chromium', 'condition': 'checkout_android and not build_with_chromium',
}, },
} }
......
...@@ -28,8 +28,12 @@ def main(): ...@@ -28,8 +28,12 @@ def main():
with open('.gclient') as gclient_file: with open('.gclient') as gclient_file:
content = gclient_file.read() content = gclient_file.read()
content = content.replace('change2dot', '.')
if sys.platform.startswith('linux') or sys.platform == 'darwin':
content += 'target_os = [ \'android\' ]\n'
with open('.gclient', 'w') as gclient_file: with open('.gclient', 'w') as gclient_file:
gclient_file.write(content.replace('change2dot', '.')) gclient_file.write(content)
print 'created .gclient' print 'created .gclient'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment