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

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

Issue 1534873002: Download sysroot from "commondatastorage.googleapis.com" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: doh 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 b8f34edb3ff822bc2474908d40b8e4a18ee79224..591999d566accb6d12b3a8aea162b77d23ed27c5 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -91,11 +91,6 @@ def DetectTargetArch():
This works by looking for target_arch in GYP_DEFINES.
"""
- # TODO(agrieve): Make this script not depend on GYP_DEFINES so that it works
- # with GN as well.
- gyp_environment.SetEnvironment()
- supplemental_includes = gyp_chromium.GetSupplementalFiles()
- gyp_defines = gyp_chromium.GetGypVars(supplemental_includes)
target_arch = gyp_defines.get('target_arch')
if target_arch == 'x64':
return 'amd64'
@@ -139,6 +134,10 @@ def main():
if options.running_as_hook and not sys.platform.startswith('linux'):
return 0
+ if gyp_defines.has_key('use_sysroot') \
+ and int(gyp_defines['use_sysroot']) == 0:
Sam Clegg 2015/12/17 22:17:06 What about just `gyp_defines.get('use_sysroot') ==
+ return 0
+
if options.running_as_hook:
InstallDefaultSysroots()
else:
@@ -216,4 +215,11 @@ if __name__ == '__main__':
parser.add_option('--arch', type='choice', choices=valid_archs,
help='Sysroot architecture: %s' % ', '.join(valid_archs))
options, _ = parser.parse_args()
+
+ # TODO(agrieve): Make this script not depend on GYP_DEFINES so that it works
+ # with GN as well.
+ gyp_environment.SetEnvironment()
+ supplemental_includes = gyp_chromium.GetSupplementalFiles()
+ gyp_defines = gyp_chromium.GetGypVars(supplemental_includes)
Sam Clegg 2015/12/17 22:15:45 Can you do this in main and pass gyp_defines to De
+
sys.exit(main())
« 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