| 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 subprocess | 7 import subprocess |
| 8 import sys | 8 import sys |
| 9 import os | 9 import os |
| 10 import utils | 10 import utils |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 # checked-in sdk, this can be removed. | 62 # checked-in sdk, this can be removed. |
| 63 gn_args['dart_host_pub_exe'] = os.path.join( | 63 gn_args['dart_host_pub_exe'] = os.path.join( |
| 64 DART_ROOT, 'tools', 'sdks', HOST_OS, 'dart-sdk', 'bin', 'pub') | 64 DART_ROOT, 'tools', 'sdks', HOST_OS, 'dart-sdk', 'bin', 'pub') |
| 65 | 65 |
| 66 # For Fuchsia support, the default is to not compile in the root | 66 # For Fuchsia support, the default is to not compile in the root |
| 67 # certificates. | 67 # certificates. |
| 68 gn_args['dart_use_fallback_root_certificates'] = True | 68 gn_args['dart_use_fallback_root_certificates'] = True |
| 69 | 69 |
| 70 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" | 70 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" |
| 71 | 71 |
| 72 gn_args['dart_use_tcmalloc'] = gn_args['target_os'] == 'linux' |
| 73 |
| 72 gn_args['is_debug'] = args.mode == 'debug' | 74 gn_args['is_debug'] = args.mode == 'debug' |
| 73 gn_args['is_release'] = args.mode == 'release' | 75 gn_args['is_release'] = args.mode == 'release' |
| 74 gn_args['is_product'] = args.mode == 'product' | 76 gn_args['is_product'] = args.mode == 'product' |
| 75 gn_args['dart_debug'] = args.mode == 'debug' | 77 gn_args['dart_debug'] = args.mode == 'debug' |
| 76 | 78 |
| 77 # This setting is only meaningful for Flutter. Standalone builds of the VM | 79 # This setting is only meaningful for Flutter. Standalone builds of the VM |
| 78 # should leave this set to 'develop', which causes the build to defer to | 80 # should leave this set to 'develop', which causes the build to defer to |
| 79 # 'is_debug', 'is_release' and 'is_product'. | 81 # 'is_debug', 'is_release' and 'is_product'. |
| 80 gn_args['dart_runtime_mode'] = 'develop' | 82 gn_args['dart_runtime_mode'] = 'develop' |
| 81 | 83 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 ] | 152 ] |
| 151 gn_args = to_command_line(to_gn_args(args)) | 153 gn_args = to_command_line(to_gn_args(args)) |
| 152 out_dir = get_out_dir(args) | 154 out_dir = get_out_dir(args) |
| 153 print "gn gen --check in %s" % out_dir | 155 print "gn gen --check in %s" % out_dir |
| 154 command.append(out_dir) | 156 command.append(out_dir) |
| 155 command.append('--args=%s' % ' '.join(gn_args)) | 157 command.append('--args=%s' % ' '.join(gn_args)) |
| 156 return subprocess.call(command, cwd=DART_ROOT) | 158 return subprocess.call(command, cwd=DART_ROOT) |
| 157 | 159 |
| 158 if __name__ == '__main__': | 160 if __name__ == '__main__': |
| 159 sys.exit(main(sys.argv)) | 161 sys.exit(main(sys.argv)) |
| OLD | NEW |