Index: tools/build.py |
=================================================================== |
--- tools/build.py (revision 27268) |
+++ tools/build.py (working copy) |
@@ -101,7 +101,7 @@ |
print ("Cross-compilation to %s is not supported on host os %s." |
% (os, HOST_OS)) |
return False |
- if not arch in ['ia32']: |
+ if not arch in ['ia32', 'arm']: |
print ("Cross-compilation to %s is not supported for architecture %s." |
% (os, arch)) |
return False |
@@ -144,7 +144,7 @@ |
raise Exception('Unsupported host os %s' % host_os) |
if target_os not in ['android']: |
raise Exception('Unsupported target os %s' % target_os) |
- if target_arch not in ['ia32']: |
+ if target_arch not in ['ia32', 'arm']: |
raise Exception('Unsupported target architecture %s' % target_arch) |
CheckDirExists(THIRD_PARTY_ROOT, 'third party tools'); |
@@ -158,7 +158,10 @@ |
os.environ['ANDROID_NDK_ROOT'] = android_ndk_root |
os.environ['ANDROID_SDK_ROOT'] = android_sdk_root |
- toolchain_arch = 'x86-4.4.3' |
+ if target_arch == 'arm': |
+ toolchain_arch = 'arm-linux-androideabi-4.6' |
+ else: |
+ toolchain_arch = 'x86-4.4.3' |
toolchain_dir = 'linux-x86' |
android_toolchain = os.path.join(android_ndk_root, |
'toolchains', toolchain_arch, |
@@ -184,8 +187,13 @@ |
] |
os.environ['PATH'] = ':'.join(pathList) |
+ android_target_arch = target_arch |
+ if target_arch == 'ia32': |
+ android_target_arch = 'x86' |
+ |
gypDefinesList = [ |
- 'target_arch=ia32', |
+ 'target_arch=%s' % target_arch, |
+ 'android_target_arch=%s' % android_target_arch, |
'OS=%s' % target_os, |
'android_build_type=0', |
'host_os=%s' % host_os, |
@@ -417,9 +425,12 @@ |
RunhooksIfNeeded(HOST_OS, mode, arch, target_os) |
toolchainprefix = None |
- if target_os == 'android': |
+ if target_os == 'android' and arch == 'ia32': |
vsm
2013/09/06 23:25:30
nit: I think
if target_os == 'android':
if a
zra
2013/09/13 23:28:45
Done.
|
toolchainprefix = ('%s/i686-linux-android' |
% os.environ['ANDROID_TOOLCHAIN']) |
+ elif target_os == 'android' and arch == 'arm': |
+ toolchainprefix = ('%s/arm-linux-androideabi' |
+ % os.environ['ANDROID_TOOLCHAIN']) |
toolsOverride = SetTools(arch, toolchainprefix) |
if toolsOverride: |
printToolOverrides = target_os != 'android' |