Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: tools/generate_buildfiles.py

Issue 2861363002: [infra] Make gclient runhooks gn for Android on supported platforms (Closed)
Patch Set: Cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/standalone.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/generate_buildfiles.py
diff --git a/tools/generate_buildfiles.py b/tools/generate_buildfiles.py
index b6be5a4edcac50616d91f3767d3ed63dda1d00cc..0879e092cb15f47128ffb5cf43c35e1fbeb8c8d1 100755
--- a/tools/generate_buildfiles.py
+++ b/tools/generate_buildfiles.py
@@ -9,6 +9,7 @@ import subprocess
import sys
import utils
+HOST_OS = utils.GuessOS()
SCRIPT_DIR = os.path.dirname(sys.argv[0])
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
DART_USE_GYP = "DART_USE_GYP"
@@ -29,7 +30,23 @@ def execute(args):
return process.returncode
-def run_gn(options):
+def run_android_gn(options):
+ if not HOST_OS in ['linux', 'macos']:
+ return 0
+ gn_command = [
+ 'python',
+ os.path.join(DART_ROOT, 'tools', 'gn.py'),
+ '-m', 'all',
+ '-a', 'arm,arm64',
+ '--os', 'android',
+ ]
+ if options.verbose:
+ gn_command.append('-v')
+ print ' '.join(gn_command)
+ return execute(gn_command)
+
+
+def run_host_gn(options):
gn_command = [
'python',
os.path.join(DART_ROOT, 'tools', 'gn.py'),
@@ -42,6 +59,13 @@ def run_gn(options):
return execute(gn_command)
+def run_gn(options):
+ status = run_host_gn(options)
+ if status != 0:
+ return status
+ return run_android_gn(options)
+
+
def run_gyp(options):
gyp_command = [
'python',
« no previous file with comments | « tests/standalone/standalone.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698