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

Side by Side Diff: build/gyp_chromium

Issue 106243002: Treat cygwin the same as Windows when selecting the GN binary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 return result 136 return result
137 137
138 138
139 def RunGN(supplemental_includes): 139 def RunGN(supplemental_includes):
140 """Runs GN, returning True if it succeeded, printing an error and returning 140 """Runs GN, returning True if it succeeded, printing an error and returning
141 false if not.""" 141 false if not."""
142 142
143 # The binaries in platform-specific subdirectories in src/tools/gn/bin. 143 # The binaries in platform-specific subdirectories in src/tools/gn/bin.
144 gnpath = SRC_DIR + '/tools/gn/bin/' 144 gnpath = SRC_DIR + '/tools/gn/bin/'
145 if sys.platform == 'win32': 145 if sys.platform in ('cygwin', 'win32'):
146 gnpath += 'win/gn.exe' 146 gnpath += 'win/gn.exe'
147 elif sys.platform.startswith('linux'): 147 elif sys.platform.startswith('linux'):
148 # On Linux we have 32-bit and 64-bit versions. 148 # On Linux we have 32-bit and 64-bit versions.
149 if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0: 149 if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0:
150 gnpath += 'linux/gn' 150 gnpath += 'linux/gn'
151 else: 151 else:
152 gnpath += 'linux/gn32' 152 gnpath += 'linux/gn32'
153 elif sys.platform == 'darwin': 153 elif sys.platform == 'darwin':
154 gnpath += 'mac/gn' 154 gnpath += 'mac/gn'
155 else: 155 else:
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 # to enfore syntax checking. 278 # to enfore syntax checking.
279 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 279 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
280 if syntax_check and int(syntax_check): 280 if syntax_check and int(syntax_check):
281 args.append('--check') 281 args.append('--check')
282 282
283 print 'Updating projects from gyp files...' 283 print 'Updating projects from gyp files...'
284 sys.stdout.flush() 284 sys.stdout.flush()
285 285
286 # Off we go... 286 # Off we go...
287 sys.exit(gyp.main(args)) 287 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