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 shutil | 9 import shutil |
10 import subprocess | 10 import subprocess |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 if target_os == 'host': | 140 if target_os == 'host': |
141 gn_args['target_os'] = host_os | 141 gn_args['target_os'] = host_os |
142 else: | 142 else: |
143 gn_args['target_os'] = target_os | 143 gn_args['target_os'] = target_os |
144 | 144 |
145 gn_args['dart_target_arch'] = arch | 145 gn_args['dart_target_arch'] = arch |
146 gn_args['target_cpu'] = TargetCpuForArch(arch, target_os) | 146 gn_args['target_cpu'] = TargetCpuForArch(arch, target_os) |
147 gn_args['host_cpu'] = HostCpuForArch(arch) | 147 gn_args['host_cpu'] = HostCpuForArch(arch) |
148 crossbuild = gn_args['target_cpu'] != gn_args['host_cpu'] | 148 crossbuild = gn_args['target_cpu'] != gn_args['host_cpu'] |
149 | 149 |
150 # See: runtime/observatory/BUILD.gn. | |
151 # This allows the standalone build of the observatory to fall back on | |
152 # dart_bootstrap if the prebuilt SDK doesn't work. | |
153 gn_args['dart_host_pub_exe'] = "" | |
154 | |
155 if arch != HostCpuForArch(arch): | 150 if arch != HostCpuForArch(arch): |
156 # Training an app-jit snapshot under a simulator is slow. Use script | 151 # Training an app-jit snapshot under a simulator is slow. Use script |
157 # snapshots instead. | 152 # snapshots instead. |
158 gn_args['dart_snapshot_kind'] = 'script' | 153 gn_args['dart_snapshot_kind'] = 'script' |
159 else: | 154 else: |
160 gn_args['dart_snapshot_kind'] = 'app-jit' | 155 gn_args['dart_snapshot_kind'] = 'app-jit' |
161 | 156 |
162 # We only want the fallback root certs in the standalone VM on | 157 # We only want the fallback root certs in the standalone VM on |
163 # Linux and Windows. | 158 # Linux and Windows. |
164 if gn_args['target_os'] in ['linux', 'win']: | 159 if gn_args['target_os'] in ['linux', 'win']: |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 return 1 | 462 return 1 |
468 | 463 |
469 endtime = time.time() | 464 endtime = time.time() |
470 if args.verbose: | 465 if args.verbose: |
471 print ("GN Time: %.3f seconds" % (endtime - starttime)) | 466 print ("GN Time: %.3f seconds" % (endtime - starttime)) |
472 return 0 | 467 return 0 |
473 | 468 |
474 | 469 |
475 if __name__ == '__main__': | 470 if __name__ == '__main__': |
476 sys.exit(Main(sys.argv)) | 471 sys.exit(Main(sys.argv)) |
OLD | NEW |