| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 gn_args['dart_use_fallback_root_certificates'] = True | 133 gn_args['dart_use_fallback_root_certificates'] = True |
| 134 | 134 |
| 135 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" | 135 gn_args['dart_zlib_path'] = "//runtime/bin/zlib" |
| 136 | 136 |
| 137 # Use tcmalloc only when targeting Linux and when not using ASAN. | 137 # Use tcmalloc only when targeting Linux and when not using ASAN. |
| 138 gn_args['dart_use_tcmalloc'] = ((gn_args['target_os'] == 'linux') | 138 gn_args['dart_use_tcmalloc'] = ((gn_args['target_os'] == 'linux') |
| 139 and not args.asan | 139 and not args.asan |
| 140 and not args.msan | 140 and not args.msan |
| 141 and not args.tsan) | 141 and not args.tsan) |
| 142 | 142 |
| 143 # Force -mfloat-abi=hard and -mfpu=neon on Linux as we're specifying | 143 if gn_args['target_os'] == 'linux': |
| 144 # a gnueabihf compiler in //build/toolchain/linux BUILD.gn. | 144 if gn_args['target_cpu'] == 'arm': |
| 145 # TODO(zra): This will likely need some adjustment to build for armv6 etc. | 145 # Force -mfloat-abi=hard and -mfpu=neon for arm on Linux as we're |
| 146 hard_float = (gn_args['target_cpu'].startswith('arm') and | 146 # specifying a gnueabihf compiler in //build/toolchain/linux BUILD.gn. |
| 147 (gn_args['target_os'] == 'linux')) | 147 gn_args['arm_arch'] = 'armv7' |
| 148 if hard_float: | 148 gn_args['arm_float_abi'] = 'hard' |
| 149 gn_args['arm_float_abi'] = 'hard' | 149 gn_args['arm_use_neon'] = True |
| 150 gn_args['arm_use_neon'] = True | 150 elif gn_args['target_cpu'] == 'armv6': |
| 151 raise Exception("GN support for armv6 unimplemented") |
| 152 elif gn_args['target_cpu'] == 'armv5te': |
| 153 raise Exception("GN support for armv5te unimplemented") |
| 151 | 154 |
| 152 gn_args['is_debug'] = mode == 'debug' | 155 gn_args['is_debug'] = mode == 'debug' |
| 153 gn_args['is_release'] = mode == 'release' | 156 gn_args['is_release'] = mode == 'release' |
| 154 gn_args['is_product'] = mode == 'product' | 157 gn_args['is_product'] = mode == 'product' |
| 155 gn_args['dart_debug'] = mode == 'debug' | 158 gn_args['dart_debug'] = mode == 'debug' |
| 156 | 159 |
| 157 # This setting is only meaningful for Flutter. Standalone builds of the VM | 160 # This setting is only meaningful for Flutter. Standalone builds of the VM |
| 158 # should leave this set to 'develop', which causes the build to defer to | 161 # should leave this set to 'develop', which causes the build to defer to |
| 159 # 'is_debug', 'is_release' and 'is_product'. | 162 # 'is_debug', 'is_release' and 'is_product'. |
| 160 gn_args['dart_runtime_mode'] = 'develop' | 163 gn_args['dart_runtime_mode'] = 'develop' |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 return 1 | 419 return 1 |
| 417 | 420 |
| 418 endtime = time.time() | 421 endtime = time.time() |
| 419 if args.verbose: | 422 if args.verbose: |
| 420 print ("GN Time: %.3f seconds" % (endtime - starttime)) | 423 print ("GN Time: %.3f seconds" % (endtime - starttime)) |
| 421 return 0 | 424 return 0 |
| 422 | 425 |
| 423 | 426 |
| 424 if __name__ == '__main__': | 427 if __name__ == '__main__': |
| 425 sys.exit(main(sys.argv)) | 428 sys.exit(main(sys.argv)) |
| OLD | NEW |