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

Side by Side Diff: build/gyp_chromium

Issue 139143002: Move RunGN lower so that modifications to os.environ take effect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 # assuming 'all.gyp' from the same directory as the script. 296 # assuming 'all.gyp' from the same directory as the script.
297 if not gyp_file_specified: 297 if not gyp_file_specified:
298 gyp_file = os.environ.get('CHROMIUM_GYP_FILE') 298 gyp_file = os.environ.get('CHROMIUM_GYP_FILE')
299 if gyp_file: 299 if gyp_file:
300 # Note that CHROMIUM_GYP_FILE values can't have backslashes as 300 # Note that CHROMIUM_GYP_FILE values can't have backslashes as
301 # path separators even on Windows due to the use of shlex.split(). 301 # path separators even on Windows due to the use of shlex.split().
302 args.extend(shlex.split(gyp_file)) 302 args.extend(shlex.split(gyp_file))
303 else: 303 else:
304 args.append(os.path.join(script_dir, 'all.gyp')) 304 args.append(os.path.join(script_dir, 'all.gyp'))
305 305
306 supplemental_includes = GetSupplementalFiles()
307
308 if not RunGN(supplemental_includes):
309 sys.exit(1)
310
311 args.extend(
312 ['-I' + i for i in additional_include_files(supplemental_includes, args)])
313
314 # There shouldn't be a circular dependency relationship between .gyp files, 306 # There shouldn't be a circular dependency relationship between .gyp files,
315 # but in Chromium's .gyp files, on non-Mac platforms, circular relationships 307 # but in Chromium's .gyp files, on non-Mac platforms, circular relationships
316 # currently exist. The check for circular dependencies is currently 308 # currently exist. The check for circular dependencies is currently
317 # bypassed on other platforms, but is left enabled on the Mac, where a 309 # bypassed on other platforms, but is left enabled on the Mac, where a
318 # violation of the rule causes Xcode to misbehave badly. 310 # violation of the rule causes Xcode to misbehave badly.
319 # TODO(mark): Find and kill remaining circular dependencies, and remove this 311 # TODO(mark): Find and kill remaining circular dependencies, and remove this
320 # option. http://crbug.com/35878. 312 # option. http://crbug.com/35878.
321 # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the 313 # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the
322 # list. 314 # list.
323 if sys.platform not in ('darwin',): 315 if sys.platform not in ('darwin',):
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 for s in ('sys64', 'sys32')) 362 for s in ('sys64', 'sys32'))
371 os.environ['PATH'] = runtime_path + os.environ['PATH'] 363 os.environ['PATH'] = runtime_path + os.environ['PATH']
372 print('Using automatic toolchain in %s.' % toolchain) 364 print('Using automatic toolchain in %s.' % toolchain)
373 365
374 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check 366 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
375 # to enfore syntax checking. 367 # to enfore syntax checking.
376 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 368 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
377 if syntax_check and int(syntax_check): 369 if syntax_check and int(syntax_check):
378 args.append('--check') 370 args.append('--check')
379 371
372 supplemental_includes = GetSupplementalFiles()
373 if not RunGN(supplemental_includes):
374 sys.exit(1)
375 args.extend(
376 ['-I' + i for i in additional_include_files(supplemental_includes, args)])
377
380 print 'Updating projects from gyp files...' 378 print 'Updating projects from gyp files...'
381 sys.stdout.flush() 379 sys.stdout.flush()
382 380
383 # Off we go... 381 # Off we go...
384 sys.exit(gyp.main(args)) 382 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