Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: dart/tools/android_link.py

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tools/VERSION ('k') | dart/tools/build.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 The Dart Authors. All rights reserved. 3 # Copyright (c) 2012 The Dart Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 This script performs the final link step for Android NDK executables. 8 This script performs the final link step for Android NDK executables.
9 Usage: 9 Usage:
10 ./android_link {arm,ia32} {executable,library,shared_library} {host,target} 10 ./android_link {arm,ia32} {executable,library,shared_library} {host,target}
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools'); 72 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools');
73 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools') 73 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools')
74 CheckDirExists(android_tools, 'Android tools') 74 CheckDirExists(android_tools, 'Android tools')
75 android_ndk_root = os.path.join(android_tools, 'ndk') 75 android_ndk_root = os.path.join(android_tools, 'ndk')
76 CheckDirExists(android_ndk_root, 'Android NDK') 76 CheckDirExists(android_ndk_root, 'Android NDK')
77 77
78 # Set up the directory of the Android NDK cross-compiler toolchain. 78 # Set up the directory of the Android NDK cross-compiler toolchain.
79 toolchain_arch = 'arm-linux-androideabi-4.6' 79 toolchain_arch = 'arm-linux-androideabi-4.6'
80 if target_arch == 'ia32': 80 if target_arch == 'ia32':
81 toolchain_arch = 'x86-4.6' 81 toolchain_arch = 'x86-4.6'
82 toolchain_dir = 'linux-x86' 82 toolchain_dir = 'linux-x86_64'
83 android_toolchain = os.path.join(android_ndk_root, 83 android_toolchain = os.path.join(android_ndk_root,
84 'toolchains', toolchain_arch, 84 'toolchains', toolchain_arch,
85 'prebuilt', toolchain_dir, 'bin') 85 'prebuilt', toolchain_dir, 'bin')
86 CheckDirExists(android_toolchain, 'Android toolchain') 86 CheckDirExists(android_toolchain, 'Android toolchain')
87 87
88 # Set up the path to the linker executable. 88 # Set up the path to the linker executable.
89 android_linker = os.path.join(android_toolchain, 'arm-linux-androideabi-g++') 89 android_linker = os.path.join(android_toolchain, 'arm-linux-androideabi-g++')
90 if target_arch == 'ia32': 90 if target_arch == 'ia32':
91 android_linker = os.path.join(android_toolchain, 'i686-linux-android-g++') 91 android_linker = os.path.join(android_toolchain, 'i686-linux-android-g++')
92 92
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 link_args.insert(0, android_linker) 127 link_args.insert(0, android_linker)
128 else: 128 else:
129 link_args.extend(['-ldl', '-lrt']) 129 link_args.extend(['-ldl', '-lrt'])
130 link_args.insert(0, 'g++') 130 link_args.insert(0, 'g++')
131 131
132 sys.exit(execute(link_args)) 132 sys.exit(execute(link_args))
133 133
134 if __name__ == '__main__': 134 if __name__ == '__main__':
135 main() 135 main()
OLDNEW
« no previous file with comments | « dart/tools/VERSION ('k') | dart/tools/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698