| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 # This a simple script to make building/testing Mojo components easier. | 6 # This a simple script to make building/testing Mojo components easier. |
| 7 | 7 |
| 8 import argparse | 8 import argparse |
| 9 from copy import deepcopy | 9 from copy import deepcopy |
| 10 import os | 10 import os |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 else: | 101 else: |
| 102 gn_args.append('use_goma=false') | 102 gn_args.append('use_goma=false') |
| 103 | 103 |
| 104 if config.values['use_nacl']: | 104 if config.values['use_nacl']: |
| 105 gn_args.append('mojo_use_nacl=true') | 105 gn_args.append('mojo_use_nacl=true') |
| 106 | 106 |
| 107 if config.target_os == Config.OS_ANDROID: | 107 if config.target_os == Config.OS_ANDROID: |
| 108 gn_args.append(r'''os=\"android\"''') | 108 gn_args.append(r'''os=\"android\"''') |
| 109 elif config.target_os == Config.OS_CHROMEOS: | 109 elif config.target_os == Config.OS_CHROMEOS: |
| 110 gn_args.append(r'''os=\"chromeos\" use_system_harfbuzz=false''') | 110 gn_args.append(r'''os=\"chromeos\" use_system_harfbuzz=false''') |
| 111 elif config.target_os == Config.OS_LINUX: |
| 112 gn_args.append(r'''use_system_harfbuzz=false is_desktop_linux=false''') |
| 113 gn_args.append(r'''use_glib=false use_aura=false''') |
| 111 | 114 |
| 112 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) | 115 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) |
| 113 | 116 |
| 114 out_dir = _get_out_dir(config) | 117 out_dir = _get_out_dir(config) |
| 115 command.append(out_dir) | 118 command.append(out_dir) |
| 116 command.append('--args="%s"' % ' '.join(gn_args)) | 119 command.append('--args="%s"' % ' '.join(gn_args)) |
| 117 | 120 |
| 118 print 'Running %s ...' % ' '.join(command) | 121 print 'Running %s ...' % ' '.join(command) |
| 119 return subprocess.call(' '.join(command), shell=True) | 122 return subprocess.call(' '.join(command), shell=True) |
| 120 | 123 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 help='Run NaCl unit tests (does not build).') | 274 help='Run NaCl unit tests (does not build).') |
| 272 nacltest_parser.set_defaults(func=nacltest) | 275 nacltest_parser.set_defaults(func=nacltest) |
| 273 | 276 |
| 274 args = parser.parse_args() | 277 args = parser.parse_args() |
| 275 config = _args_to_config(args) | 278 config = _args_to_config(args) |
| 276 return args.func(config) | 279 return args.func(config) |
| 277 | 280 |
| 278 | 281 |
| 279 if __name__ == '__main__': | 282 if __name__ == '__main__': |
| 280 sys.exit(main()) | 283 sys.exit(main()) |
| OLD | NEW |