| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 host_os = host_os_for_gn(HOST_OS) | 65 host_os = host_os_for_gn(HOST_OS) |
| 66 if target_os == 'host': | 66 if target_os == 'host': |
| 67 gn_args['target_os'] = host_os | 67 gn_args['target_os'] = host_os |
| 68 else: | 68 else: |
| 69 gn_args['target_os'] = target_os | 69 gn_args['target_os'] = target_os |
| 70 | 70 |
| 71 gn_args['dart_target_arch'] = arch | 71 gn_args['dart_target_arch'] = arch |
| 72 gn_args['target_cpu'] = target_cpu_for_arch(arch, target_os) | 72 gn_args['target_cpu'] = target_cpu_for_arch(arch, target_os) |
| 73 gn_args['host_cpu'] = host_cpu_for_arch(arch) | 73 gn_args['host_cpu'] = host_cpu_for_arch(arch) |
| 74 | 74 |
| 75 # TODO(zra): This is for the observatory, which currently builds using the | 75 # See: runtime/observatory/BUILD.gn. |
| 76 # checked-in sdk. If/when the observatory no longer builds with the | 76 # This allows the standalone build of the observatory to fall back on |
| 77 # checked-in sdk, this can be removed. | 77 # dart_bootstrap if the prebuilt SDK doesn't work. |
| 78 pub = 'pub' | 78 gn_args['dart_host_pub_exe'] = "" |
| 79 if host_os == 'win': | |
| 80 pub = pub + ".bat" | |
| 81 gn_args['dart_host_pub_exe'] = os.path.join( | |
| 82 DART_ROOT, 'tools', 'sdks', host_os, 'dart-sdk', 'bin', pub) | |
| 83 | 79 |
| 84 # For Fuchsia support, the default is to not compile in the root | 80 # For Fuchsia support, the default is to not compile in the root |
| 85 # certificates. | 81 # certificates. |
| 86 gn_args['dart_use_fallback_root_certificates'] = True | 82 gn_args['dart_use_fallback_root_certificates'] = True |
| 87 | 83 |
| 88 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" | 84 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" |
| 89 | 85 |
| 90 # Use tcmalloc only when targeting Linux and when not using ASAN. | 86 # Use tcmalloc only when targeting Linux and when not using ASAN. |
| 91 gn_args['dart_use_tcmalloc'] = (gn_args['target_os'] == 'linux' | 87 gn_args['dart_use_tcmalloc'] = (gn_args['target_os'] == 'linux' |
| 92 and not args.asan) | 88 and not args.asan) |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 return 1 | 312 return 1 |
| 317 | 313 |
| 318 endtime = time.time() | 314 endtime = time.time() |
| 319 if args.verbose: | 315 if args.verbose: |
| 320 print ("GN Time: %.3f seconds" % (endtime - starttime)) | 316 print ("GN Time: %.3f seconds" % (endtime - starttime)) |
| 321 return 0 | 317 return 0 |
| 322 | 318 |
| 323 | 319 |
| 324 if __name__ == '__main__': | 320 if __name__ == '__main__': |
| 325 sys.exit(main(sys.argv)) | 321 sys.exit(main(sys.argv)) |
| OLD | NEW |