OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Dart project authors. All rights reserved. | 2 # Copyright 2016 The Dart project 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 import argparse | 6 import argparse |
7 import multiprocessing | 7 import multiprocessing |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 gn_args['is_clang'] = args.clang and has_clang | 113 gn_args['is_clang'] = args.clang and has_clang |
114 | 114 |
115 gn_args['is_asan'] = args.asan and gn_args['is_clang'] | 115 gn_args['is_asan'] = args.asan and gn_args['is_clang'] |
116 | 116 |
117 if args.target_sysroot: | 117 if args.target_sysroot: |
118 gn_args['target_sysroot'] = args.target_sysroot | 118 gn_args['target_sysroot'] = args.target_sysroot |
119 | 119 |
120 if args.toolchain_prefix: | 120 if args.toolchain_prefix: |
121 gn_args['toolchain_prefix'] = args.toolchain_prefix | 121 gn_args['toolchain_prefix'] = args.toolchain_prefix |
122 | 122 |
| 123 # If we are on ia32 or cross-compiling, use app snapshots without code for the
SDK. |
| 124 if arch == 'ia32' or gn_args['target_cpu'] != gn_args['host_cpu']: |
| 125 gn_args['dart_app_snapshot_kind'] = 'app-after-run' |
| 126 else: |
| 127 gn_args['dart_app_snapshot_kind'] = 'app-jit-after-run' |
| 128 |
123 goma_dir = os.environ.get('GOMA_DIR') | 129 goma_dir = os.environ.get('GOMA_DIR') |
124 goma_home_dir = os.path.join(os.getenv('HOME', ''), 'goma') | 130 goma_home_dir = os.path.join(os.getenv('HOME', ''), 'goma') |
125 if args.goma and goma_dir: | 131 if args.goma and goma_dir: |
126 gn_args['use_goma'] = True | 132 gn_args['use_goma'] = True |
127 gn_args['goma_dir'] = goma_dir | 133 gn_args['goma_dir'] = goma_dir |
128 elif args.goma and os.path.exists(goma_home_dir): | 134 elif args.goma and os.path.exists(goma_home_dir): |
129 gn_args['use_goma'] = True | 135 gn_args['use_goma'] = True |
130 gn_args['goma_dir'] = goma_home_dir | 136 gn_args['goma_dir'] = goma_home_dir |
131 else: | 137 else: |
132 gn_args['use_goma'] = False | 138 gn_args['use_goma'] = False |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 return 1 | 319 return 1 |
314 | 320 |
315 endtime = time.time() | 321 endtime = time.time() |
316 if args.verbose: | 322 if args.verbose: |
317 print ("GN Time: %.3f seconds" % (endtime - starttime)) | 323 print ("GN Time: %.3f seconds" % (endtime - starttime)) |
318 return 0 | 324 return 0 |
319 | 325 |
320 | 326 |
321 if __name__ == '__main__': | 327 if __name__ == '__main__': |
322 sys.exit(main(sys.argv)) | 328 sys.exit(main(sys.argv)) |
OLD | NEW |