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

Side by Side Diff: tools/build.py

Issue 2449503002: Change build.py to invoke gn with '--check' to match the build bot's script and Flutter's usage. (Closed)
Patch Set: Created 4 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
« 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 Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 402
403 def RunGN(target_os, mode, arch): 403 def RunGN(target_os, mode, arch):
404 gn_os = 'host' if target_os == HOST_OS else target_os 404 gn_os = 'host' if target_os == HOST_OS else target_os
405 gn_command = [ 405 gn_command = [
406 'python', 406 'python',
407 os.path.join(DART_ROOT, 'tools', 'gn.py'), 407 os.path.join(DART_ROOT, 'tools', 'gn.py'),
408 '-m', mode, 408 '-m', mode,
409 '-a', arch, 409 '-a', arch,
410 '--os', gn_os, 410 '--os', gn_os,
411 '--check',
411 '-v', 412 '-v',
412 ] 413 ]
413 process = subprocess.Popen(gn_command) 414 process = subprocess.Popen(gn_command)
414 process.wait() 415 process.wait()
415 if process.returncode != 0: 416 if process.returncode != 0:
416 print ("Tried to run GN, but it failed. Try running it manually: \n\t$ " + 417 print ("Tried to run GN, but it failed. Try running it manually: \n\t$ " +
417 ' '.join(gn_command)) 418 ' '.join(gn_command))
418 419
419 def BuildNinjaCommand(options, target, target_os, mode, arch): 420 def BuildNinjaCommand(options, target, target_os, mode, arch):
420 out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os) 421 out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 else: 597 else:
597 if BuildOneConfig(options, target, target_os, 598 if BuildOneConfig(options, target, target_os,
598 mode, arch, cross_build) != 0: 599 mode, arch, cross_build) != 0:
599 return 1 600 return 1
600 601
601 return 0 602 return 0
602 603
603 604
604 if __name__ == '__main__': 605 if __name__ == '__main__':
605 sys.exit(Main()) 606 sys.exit(Main())
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