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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 raise Exception('Unsupported target architecture %s' % target_arch) | 195 raise Exception('Unsupported target architecture %s' % target_arch) |
196 | 196 |
197 # Set up path to the Android NDK. | 197 # Set up path to the Android NDK. |
198 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools') | 198 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools') |
199 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools') | 199 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools') |
200 CheckDirExists(android_tools, 'Android tools') | 200 CheckDirExists(android_tools, 'Android tools') |
201 android_ndk_root = os.path.join(android_tools, 'ndk') | 201 android_ndk_root = os.path.join(android_tools, 'ndk') |
202 CheckDirExists(android_ndk_root, 'Android NDK') | 202 CheckDirExists(android_ndk_root, 'Android NDK') |
203 | 203 |
204 # Set up the directory of the Android NDK cross-compiler toolchain. | 204 # Set up the directory of the Android NDK cross-compiler toolchain. |
205 toolchain_arch = 'arm-linux-androideabi-4.6' | 205 toolchain_arch = 'arm-linux-androideabi-4.9' |
206 if target_arch == 'arm64': | 206 if target_arch == 'arm64': |
207 toolchain_arch = 'aarch64-linux-android-4.9' | 207 toolchain_arch = 'aarch64-linux-android-4.9' |
208 if target_arch == 'ia32': | 208 if target_arch == 'ia32': |
209 toolchain_arch = 'x86-4.6' | 209 toolchain_arch = 'x86-4.9' |
210 toolchain_dir = 'linux-x86_64' | 210 toolchain_dir = 'linux-x86_64' |
211 android_toolchain = os.path.join(android_ndk_root, | 211 android_toolchain = os.path.join(android_ndk_root, |
212 'toolchains', toolchain_arch, | 212 'toolchains', toolchain_arch, |
213 'prebuilt', toolchain_dir, 'bin') | 213 'prebuilt', toolchain_dir, 'bin') |
214 CheckDirExists(android_toolchain, 'Android toolchain') | 214 CheckDirExists(android_toolchain, 'Android toolchain') |
215 | 215 |
216 return android_toolchain | 216 return android_toolchain |
217 | 217 |
218 | 218 |
219 def Execute(args): | 219 def Execute(args): |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 else: | 548 else: |
549 if BuildOneConfig(options, target, target_os, | 549 if BuildOneConfig(options, target, target_os, |
550 mode, arch, cross_build) != 0: | 550 mode, arch, cross_build) != 0: |
551 return 1 | 551 return 1 |
552 | 552 |
553 return 0 | 553 return 0 |
554 | 554 |
555 | 555 |
556 if __name__ == '__main__': | 556 if __name__ == '__main__': |
557 sys.exit(Main()) | 557 sys.exit(Main()) |
OLD | NEW |