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

Side by Side Diff: build/gyp_chromium

Issue 100053008: Check getconf to get the bittedness of the local system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« 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 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is wrapper for Chromium that adds some support for how GYP 7 # This script is wrapper for Chromium that adds some support for how GYP
8 # is invoked by Chromium beyond what can be done in the gclient hooks. 8 # is invoked by Chromium beyond what can be done in the gclient hooks.
9 9
10 import glob 10 import glob
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 def RunGN(supplemental_includes): 125 def RunGN(supplemental_includes):
126 """Runs GN, returning True if it succeeded, printing an error and returning 126 """Runs GN, returning True if it succeeded, printing an error and returning
127 false if not.""" 127 false if not."""
128 128
129 # The binaries in platform-specific subdirectories in src/tools/gn/bin. 129 # The binaries in platform-specific subdirectories in src/tools/gn/bin.
130 gnpath = SRC_DIR + '/tools/gn/bin/' 130 gnpath = SRC_DIR + '/tools/gn/bin/'
131 if sys.platform == 'win32': 131 if sys.platform == 'win32':
132 gnpath += 'win/gn.exe' 132 gnpath += 'win/gn.exe'
133 elif sys.platform.startswith('linux'): 133 elif sys.platform.startswith('linux'):
134 # On Linux we have 32-bit and 64-bit versions. Checking /sbin/init avoids 134 # On Linux we have 32-bit and 64-bit versions.
135 # uname's confusion when running a 32-bit userland on a 64-bit kernel. 135 if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0:
136 if subprocess.check_output(["file", "/sbin/init"]).find("ELF 64-bit") >= 0:
137 gnpath += 'linux/gn' 136 gnpath += 'linux/gn'
138 else: 137 else:
139 gnpath += 'linux/gn32' 138 gnpath += 'linux/gn32'
140 elif sys.platform == 'darwin': 139 elif sys.platform == 'darwin':
141 gnpath += 'mac/gn' 140 gnpath += 'mac/gn'
142 else: 141 else:
143 print 'Unknown platform for GN: ', sys.platform 142 print 'Unknown platform for GN: ', sys.platform
144 return False 143 return False
145 144
146 print 'Generating gyp files from GN...' 145 print 'Generating gyp files from GN...'
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 # to enfore syntax checking. 264 # to enfore syntax checking.
266 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 265 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
267 if syntax_check and int(syntax_check): 266 if syntax_check and int(syntax_check):
268 args.append('--check') 267 args.append('--check')
269 268
270 print 'Updating projects from gyp files...' 269 print 'Updating projects from gyp files...'
271 sys.stdout.flush() 270 sys.stdout.flush()
272 271
273 # Off we go... 272 # Off we go...
274 sys.exit(gyp.main(args)) 273 sys.exit(gyp.main(args))
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