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

Unified Diff: build/linux/sysroot_scripts/install-sysroot.py

Issue 1493913002: Always install default host sysroots from gclient runhooks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/sysroot_scripts/install-sysroot.py
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index e922cb7a9f33ed3b0459b7b8c83f32f97c0ca6af..f5993b919b5d8333b869f1bf88ed0cde4b0796e2 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -65,7 +65,7 @@ def GetSha1(filename):
return sha1.hexdigest()
-def DetectArch(gyp_defines, is_android):
+def DetectArch(gyp_defines):
# Check for optional target_arch and only install for that architecture.
# If target_arch is not specified, then only install for the host
# architecture.
@@ -83,9 +83,6 @@ def DetectArch(gyp_defines, is_android):
elif target_arch:
raise Exception('Unrecognized target_arch: %s' % target_arch)
- if is_android:
- return 'arm'
-
# Figure out host arch using build/detect_host_arch.py and
# set target_arch to host arch
detected_host_arch = detect_host_arch.HostArch()
@@ -107,31 +104,27 @@ def main():
if options.running_as_hook and not sys.platform.startswith('linux'):
return 0
+ # TODO(agrieve): Stop using GYP_DEFINES and ensure bots that cross-compile
+ # explicitly download sysroots.
Dirk Pranke 2015/12/02 23:09:22 I don't think we want a bot-only solution, so this
agrieve 2015/12/03 02:06:24 Done.
gyp_environment.SetEnvironment()
supplemental_includes = gyp_chromium.GetSupplementalFiles()
gyp_defines = gyp_chromium.GetGypVars(supplemental_includes)
- is_android = gyp_defines.get('OS') == 'android'
-
- if (options.running_as_hook and (not is_android) and
- (gyp_defines.get('chromeos') or gyp_defines.get('use_sysroot') == '0')):
- return 0
Sam Clegg 2015/12/02 23:17:46 Why not keep this early out?
agrieve 2015/12/03 02:06:24 Because you might have built with both GYP and GN
if options.arch:
target_arch = options.arch
else:
- target_arch = DetectArch(gyp_defines, is_android)
+ target_arch = DetectArch(gyp_defines)
if not target_arch:
print 'Unable to detect target architecture'
return 1
- if is_android:
- # 32-bit Android builds require a 32-bit host sysroot for the v8 snapshot.
- if '64' not in target_arch:
+ if target_arch == 'amd64':
Sam Clegg 2015/12/02 23:17:46 Won't target_arch be 'arm' here for most android b
Dirk Pranke 2015/12/02 23:20:38 Not necessarily. The bots don't have to set target
agrieve 2015/12/03 02:06:24 Reworked this to look for the presence of //third_
+ # 32-bit Android builds (the default) require a 32-bit host sysroot for
+ # the v8 snapshot, and a 64-bit sysroot for host tools. Assume 'amd64'
+ # means default setup.
Dirk Pranke 2015/12/02 23:09:22 I don't think it's really clear what "(the default
agrieve 2015/12/03 02:06:24 reworded.
ret = _InstallSysroot('i386')
if ret:
return ret
- # Always need host sysroot (which we assume is x64).
- target_arch = 'amd64'
return _InstallSysroot(target_arch)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698