[Android] Update mb android gn target logic & override isolate targets on Android+GN.
BUG=589318
Review-Url: https://codereview.chromium.org/1927143002
Cr-Commit-Position: refs/heads/master@{#390534}
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index b03f03a..2e575cd5 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -782,9 +782,10 @@
self.Print('GN gen failed: %d' % ret)
return ret
+ android = 'target_os="android"' in vals['gn_args']
for target in swarming_targets:
- if target.endswith('_apk'):
- # "_apk" targets may be either android_apk or executable. The former
+ if android:
+ # Android targets may be either android_apk or executable. The former
# will result in runtime_deps associated with the stamp file, while the
# latter will result in runtime_deps associated with the executable.
target_name = self.GNTargetName(target)
@@ -1326,7 +1327,7 @@
self.Print(json.dumps(obj, indent=2, sort_keys=True))
def GNTargetName(self, target):
- return target[:-len('_apk')] if target.endswith('_apk') else target
+ return target
def Build(self, target):
build_dir = self.ToSrcRelPath(self.args.path[0])