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

Side by Side Diff: build/gyp_chromium

Issue 103253002: Fix crash during build/gyp_chromium time. (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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 with open(supplement, 'r') as f: 68 with open(supplement, 'r') as f:
69 try: 69 try:
70 file_data = eval(f.read(), {'__builtins__': None}, None) 70 file_data = eval(f.read(), {'__builtins__': None}, None)
71 except SyntaxError, e: 71 except SyntaxError, e:
72 e.filename = os.path.abspath(supplement) 72 e.filename = os.path.abspath(supplement)
73 raise 73 raise
74 variables = file_data.get('variables') 74 variables = file_data.get('variables')
75 for v in variables: 75 for v in variables:
76 vars_dict[v] = '"' + variables[v] + '"' 76 vars_dict[v] = '"' + variables[v] + '"'
77 77
78 env_string = os.environ.get('GYP_DEFINES', []) 78 env_string = os.environ.get('GYP_DEFINES', '')
79 items = shlex.split(env_string) 79 items = shlex.split(env_string)
80 for item in items: 80 for item in items:
81 tokens = item.split('=', 1) 81 tokens = item.split('=', 1)
82 if len(tokens) == 2: 82 if len(tokens) == 2:
83 # Escape $ characters which have special meaning to GN. 83 # Escape $ characters which have special meaning to GN.
84 vars_dict[tokens[0]] = '"' + tokens[1].replace("$", "\\$") + '"' 84 vars_dict[tokens[0]] = '"' + tokens[1].replace("$", "\\$") + '"'
85 else: 85 else:
86 # No value supplied, treat it as a boolean and set it. 86 # No value supplied, treat it as a boolean and set it.
87 vars_dict[tokens[0]] = 'true' 87 vars_dict[tokens[0]] = 'true'
88 88
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 # to enfore syntax checking. 265 # to enfore syntax checking.
266 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 266 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
267 if syntax_check and int(syntax_check): 267 if syntax_check and int(syntax_check):
268 args.append('--check') 268 args.append('--check')
269 269
270 print 'Updating projects from gyp files...' 270 print 'Updating projects from gyp files...'
271 sys.stdout.flush() 271 sys.stdout.flush()
272 272
273 # Off we go... 273 # Off we go...
274 sys.exit(gyp.main(args)) 274 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