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

Side by Side Diff: build/linux/sysroot_scripts/install-sysroot.py

Issue 1430143002: Install both 32 and 64 bit x86 sysroots when arm is the target_cpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Script to install a Debian Wheezy sysroot for making official Google Chrome 6 # Script to install a Debian Wheezy sysroot for making official Google Chrome
7 # Linux builds. 7 # Linux builds.
8 # The sysroot is needed to make Chrome work for Debian Wheezy. 8 # The sysroot is needed to make Chrome work for Debian Wheezy.
9 # This script can be run manually but is more often run as part of gclient 9 # This script can be run manually but is more often run as part of gclient
10 # hooks. When run from hooks this script should be a no-op on non-linux 10 # hooks. When run from hooks this script should be a no-op on non-linux
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 target_arch = options.arch 125 target_arch = options.arch
126 else: 126 else:
127 target_arch = DetectArch(gyp_defines) 127 target_arch = DetectArch(gyp_defines)
128 if not target_arch: 128 if not target_arch:
129 print 'Unable to detect host architecture' 129 print 'Unable to detect host architecture'
130 return 1 130 return 1
131 131
132 if options.running_as_hook and not UsingSysroot(target_arch, gyp_defines): 132 if options.running_as_hook and not UsingSysroot(target_arch, gyp_defines):
133 return 0 133 return 0
134 134
135 # Android requires both 32 and 64 bit sysroots (for v8 snapshots).
136 if target_arch == 'amd64':
Dirk Pranke 2015/11/05 22:49:38 I'm confused. I thought we established that you ne
agrieve 2015/11/06 03:25:22 Ah, okay, the build instructions I was following d
137 ret = _InstallSysroot(target_arch)
138 if ret:
139 return ret
140 target_arch = 'i386'
141
142 return _InstallSysroot(target_arch)
143
144
145 def _InstallSysroot(target_arch):
135 # The sysroot directory should match the one specified in build/common.gypi. 146 # The sysroot directory should match the one specified in build/common.gypi.
136 # TODO(thestig) Consider putting this else where to avoid having to recreate 147 # TODO(thestig) Consider putting this else where to avoid having to recreate
137 # it on every build. 148 # it on every build.
138 linux_dir = os.path.dirname(SCRIPT_DIR) 149 linux_dir = os.path.dirname(SCRIPT_DIR)
139 if target_arch == 'amd64': 150 if target_arch == 'amd64':
140 sysroot = os.path.join(linux_dir, SYSROOT_DIR_AMD64) 151 sysroot = os.path.join(linux_dir, SYSROOT_DIR_AMD64)
141 tarball_filename = TARBALL_AMD64 152 tarball_filename = TARBALL_AMD64
142 tarball_sha1sum = TARBALL_AMD64_SHA1SUM 153 tarball_sha1sum = TARBALL_AMD64_SHA1SUM
143 revision = REVISION_AMD64 154 revision = REVISION_AMD64
144 elif target_arch == 'arm': 155 elif target_arch == 'arm':
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 parser = optparse.OptionParser('usage: %prog [OPTIONS]') 207 parser = optparse.OptionParser('usage: %prog [OPTIONS]')
197 parser.add_option('--running-as-hook', action='store_true', 208 parser.add_option('--running-as-hook', action='store_true',
198 default=False, help='Used when running from gclient hooks.' 209 default=False, help='Used when running from gclient hooks.'
199 ' In this mode the sysroot will only ' 210 ' In this mode the sysroot will only '
200 'be installed for official Linux ' 211 'be installed for official Linux '
201 'builds or ARM Linux builds') 212 'builds or ARM Linux builds')
202 parser.add_option('--arch', type='choice', choices=valid_archs, 213 parser.add_option('--arch', type='choice', choices=valid_archs,
203 help='Sysroot architecture: %s' % ', '.join(valid_archs)) 214 help='Sysroot architecture: %s' % ', '.join(valid_archs))
204 options, _ = parser.parse_args() 215 options, _ = parser.parse_args()
205 sys.exit(main()) 216 sys.exit(main())
OLDNEW
« 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