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

Side by Side Diff: build/gyp_chromium

Issue 51113011: mac: Don't crash in build/gyp_chromium if GYP_DEFINES isn't set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 args.append('--no-circular-check') 138 args.append('--no-circular-check')
139 139
140 # Default to ninja on linux, but only if no generator has explicitly been set. 140 # Default to ninja on linux, but only if no generator has explicitly been set.
141 # Also default to ninja on mac, but only when not building chrome/ios. 141 # Also default to ninja on mac, but only when not building chrome/ios.
142 # . -f / --format has precedence over the env var, no need to check for it 142 # . -f / --format has precedence over the env var, no need to check for it
143 # . set the env var only if it hasn't been set yet 143 # . set the env var only if it hasn't been set yet
144 # . chromium.gyp_env has been applied to os.environ at this point already 144 # . chromium.gyp_env has been applied to os.environ at this point already
145 if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'): 145 if sys.platform.startswith('linux') and not os.environ.get('GYP_GENERATORS'):
146 os.environ['GYP_GENERATORS'] = 'ninja' 146 os.environ['GYP_GENERATORS'] = 'ninja'
147 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ 147 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \
148 not 'OS=ios' in os.environ.get('GYP_DEFINES'): 148 not 'OS=ios' in os.environ.get('GYP_DEFINES', []):
149 os.environ['GYP_GENERATORS'] = 'ninja' 149 os.environ['GYP_GENERATORS'] = 'ninja'
150 150
151 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check 151 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
152 # to enfore syntax checking. 152 # to enfore syntax checking.
153 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 153 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
154 if syntax_check and int(syntax_check): 154 if syntax_check and int(syntax_check):
155 args.append('--check') 155 args.append('--check')
156 156
157 print 'Updating projects from gyp files...' 157 print 'Updating projects from gyp files...'
158 sys.stdout.flush() 158 sys.stdout.flush()
159 159
160 # Off we go... 160 # Off we go...
161 sys.exit(gyp.main(args)) 161 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