OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 # If no cross compiler is specified, only try to figure one out on Linux. | 147 # If no cross compiler is specified, only try to figure one out on Linux. |
148 if not HOST_OS in ['linux']: | 148 if not HOST_OS in ['linux']: |
149 raise Exception('Unless --toolchain is used cross-building is only ' | 149 raise Exception('Unless --toolchain is used cross-building is only ' |
150 'supported on Linux.') | 150 'supported on Linux.') |
151 | 151 |
152 # For ARM Linux, by default use the Linux distribution's cross-compiler. | 152 # For ARM Linux, by default use the Linux distribution's cross-compiler. |
153 if arch == 'arm': | 153 if arch == 'arm': |
154 # To use a non-hf compiler, specify on the command line with --toolchain. | 154 # To use a non-hf compiler, specify on the command line with --toolchain. |
155 return (DEFAULT_ARM_CROSS_COMPILER_PATH + "/arm-linux-gnueabihf") | 155 return (DEFAULT_ARM_CROSS_COMPILER_PATH + "/arm-linux-gnueabihf") |
| 156 if arch == 'arm64': |
| 157 return (DEFAULT_ARM_CROSS_COMPILER_PATH + "/aarch64-linux-gnu") |
156 | 158 |
157 # TODO(zra): Find default MIPS and ARM64 Linux cross-compilers. | 159 # TODO(zra): Find default MIPS Linux cross-compiler. |
158 | 160 |
159 return None | 161 return None |
160 | 162 |
161 | 163 |
162 def SetTools(arch, target_os, options): | 164 def SetTools(arch, target_os, options): |
163 toolsOverride = None | 165 toolsOverride = None |
164 | 166 |
165 toolchainprefix = GetToolchainPrefix(target_os, arch, options) | 167 toolchainprefix = GetToolchainPrefix(target_os, arch, options) |
166 | 168 |
167 # Override the Android toolchain's linker to handle some complexity in the | 169 # Override the Android toolchain's linker to handle some complexity in the |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 else: | 552 else: |
551 if BuildOneConfig(options, target, target_os, | 553 if BuildOneConfig(options, target, target_os, |
552 mode, arch, cross_build) != 0: | 554 mode, arch, cross_build) != 0: |
553 return 1 | 555 return 1 |
554 | 556 |
555 return 0 | 557 return 0 |
556 | 558 |
557 | 559 |
558 if __name__ == '__main__': | 560 if __name__ == '__main__': |
559 sys.exit(Main()) | 561 sys.exit(Main()) |
OLD | NEW |