| 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 gn_args.append(r'''use_glib=false''') |
| 112 elif config.target_os == Config.OS_LINUX: |
| 113 gn_args.append(r'''use_system_harfbuzz=false is_desktop_linux=false''') |
| 114 gn_args.append(r'''use_glib=false use_aura=false''') |
| 111 | 115 |
| 112 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) | 116 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) |
| 113 | 117 |
| 114 out_dir = _get_out_dir(config) | 118 out_dir = _get_out_dir(config) |
| 115 command.append(out_dir) | 119 command.append(out_dir) |
| 116 command.append('--args="%s"' % ' '.join(gn_args)) | 120 command.append('--args="%s"' % ' '.join(gn_args)) |
| 117 | 121 |
| 118 print 'Running %s ...' % ' '.join(command) | 122 print 'Running %s ...' % ' '.join(command) |
| 119 return subprocess.call(' '.join(command), shell=True) | 123 return subprocess.call(' '.join(command), shell=True) |
| 120 | 124 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 help='Run NaCl unit tests (does not build).') | 275 help='Run NaCl unit tests (does not build).') |
| 272 nacltest_parser.set_defaults(func=nacltest) | 276 nacltest_parser.set_defaults(func=nacltest) |
| 273 | 277 |
| 274 args = parser.parse_args() | 278 args = parser.parse_args() |
| 275 config = _args_to_config(args) | 279 config = _args_to_config(args) |
| 276 return args.func(config) | 280 return args.func(config) |
| 277 | 281 |
| 278 | 282 |
| 279 if __name__ == '__main__': | 283 if __name__ == '__main__': |
| 280 sys.exit(main()) | 284 sys.exit(main()) |
| OLD | NEW |