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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 if config.values['with_dart']: | 107 if config.values['with_dart']: |
108 gn_args.append('mojo_use_dart=true') | 108 gn_args.append('mojo_use_dart=true') |
109 | 109 |
110 if config.values['use_nacl']: | 110 if config.values['use_nacl']: |
111 gn_args.append('mojo_use_nacl=true') | 111 gn_args.append('mojo_use_nacl=true') |
112 | 112 |
113 if config.target_os == Config.OS_ANDROID: | 113 if config.target_os == Config.OS_ANDROID: |
114 gn_args.append(r'''os=\"android\"''') | 114 gn_args.append(r'''os=\"android\"''') |
115 elif config.target_os == Config.OS_CHROMEOS: | 115 elif config.target_os == Config.OS_CHROMEOS: |
116 gn_args.append(r'''os=\"chromeos\" ui_base_build_ime=false | 116 gn_args.append(r'''os=\"chromeos\" use_system_harfbuzz=false''') |
117 use_system_harfbuzz=false''') | |
118 | 117 |
119 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) | 118 gn_args.append(r'''cpu_arch=\"%s\"''' % config.target_arch) |
120 | 119 |
121 out_dir = _get_out_dir(config) | 120 out_dir = _get_out_dir(config) |
122 command.append(out_dir) | 121 command.append(out_dir) |
123 command.append('--args="%s"' % ' '.join(gn_args)) | 122 command.append('--args="%s"' % ' '.join(gn_args)) |
124 | 123 |
125 print 'Running %s ...' % ' '.join(command) | 124 print 'Running %s ...' % ' '.join(command) |
126 return subprocess.call(' '.join(command), shell=True) | 125 return subprocess.call(' '.join(command), shell=True) |
127 | 126 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 help='Run NaCl unit tests (does not build).') | 290 help='Run NaCl unit tests (does not build).') |
292 nacltest_parser.set_defaults(func=nacltest) | 291 nacltest_parser.set_defaults(func=nacltest) |
293 | 292 |
294 args = parser.parse_args() | 293 args = parser.parse_args() |
295 config = _args_to_config(args) | 294 config = _args_to_config(args) |
296 return args.func(config) | 295 return args.func(config) |
297 | 296 |
298 | 297 |
299 if __name__ == '__main__': | 298 if __name__ == '__main__': |
300 sys.exit(main()) | 299 sys.exit(main()) |
OLD | NEW |