| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """MB - the Meta-Build wrapper around GYP and GN | 6 """MB - the Meta-Build wrapper around GYP and GN |
| 7 | 7 |
| 8 MB is a wrapper script for GYP and GN that can be used to generate build files | 8 MB is a wrapper script for GYP and GN that can be used to generate build files |
| 9 for sets of canned configurations and analyze them. | 9 for sets of canned configurations and analyze them. |
| 10 """ | 10 """ |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 command, extra_files = self.GetIsolateCommand(target, vals) | 366 command, extra_files = self.GetIsolateCommand(target, vals) |
| 367 | 367 |
| 368 runtime_deps = self.ReadFile(deps_path).splitlines() | 368 runtime_deps = self.ReadFile(deps_path).splitlines() |
| 369 | 369 |
| 370 isolate_path = self.ToAbsPath(path, target + '.isolate') | 370 isolate_path = self.ToAbsPath(path, target + '.isolate') |
| 371 self.WriteFile(isolate_path, | 371 self.WriteFile(isolate_path, |
| 372 pprint.pformat({ | 372 pprint.pformat({ |
| 373 'variables': { | 373 'variables': { |
| 374 'command': command, | 374 'command': command, |
| 375 'files': sorted(runtime_deps + extra_files), | 375 'files': sorted(runtime_deps + extra_files), |
| 376 'read_only': 1, | |
| 377 } | 376 } |
| 378 }) + '\n') | 377 }) + '\n') |
| 379 | 378 |
| 380 self.WriteJSON( | 379 self.WriteJSON( |
| 381 { | 380 { |
| 382 'args': [ | 381 'args': [ |
| 383 '--isolated', | 382 '--isolated', |
| 384 self.ToSrcRelPath('%s%s%s.isolated' % (path, os.sep, target)), | 383 self.ToSrcRelPath('%s%s%s.isolated' % (path, os.sep, target)), |
| 385 '--isolate', | 384 '--isolate', |
| 386 self.ToSrcRelPath('%s%s%s.isolate' % (path, os.sep, target)), | 385 self.ToSrcRelPath('%s%s%s.isolate' % (path, os.sep, target)), |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 737 |
| 739 if __name__ == '__main__': | 738 if __name__ == '__main__': |
| 740 try: | 739 try: |
| 741 sys.exit(main(sys.argv[1:])) | 740 sys.exit(main(sys.argv[1:])) |
| 742 except MBErr as e: | 741 except MBErr as e: |
| 743 print(e) | 742 print(e) |
| 744 sys.exit(1) | 743 sys.exit(1) |
| 745 except KeyboardInterrupt: | 744 except KeyboardInterrupt: |
| 746 print("interrupted, exiting", stream=sys.stderr) | 745 print("interrupted, exiting", stream=sys.stderr) |
| 747 sys.exit(130) | 746 sys.exit(130) |
| OLD | NEW |