| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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()) |
| OLD | NEW |