Add support for 64-bit architectures in build_aar.py.

BUG=webrtc:7456
NOTRY=True

Review-Url: https://codereview.webrtc.org/2802693005
Cr-Commit-Position: refs/heads/master@{#17587}
This commit is contained in:
sakal
2017-04-07 05:10:15 -07:00
committed by Commit bot
parent 2ce640fada
commit 423f106e8c

View File

@ -34,7 +34,7 @@ import tempfile
import zipfile
DEFAULT_ARCHS = ['armeabi-v7a', 'x86']
DEFAULT_ARCHS = ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64']
NEEDED_SO_FILES = ['libjingle_peerconnection_so.so']
JAR_FILE = 'lib.java/webrtc/sdk/android/libwebrtc.jar'
MANIFEST_FILE = 'webrtc/sdk/android/AndroidManifest.xml'
@ -92,8 +92,12 @@ def _GetTargetCpu(arch):
"""Returns target_cpu for the GN build with the given architecture."""
if arch in ['armeabi', 'armeabi-v7a']:
return 'arm'
elif arch == 'arm64-v8a':
return 'arm64'
elif arch == 'x86':
return 'x86'
elif arch == 'x86_64':
return 'x64'
else:
raise Exception('Unknown arch: ' + arch)
@ -104,7 +108,7 @@ def _GetArmVersion(arch):
return 6
elif arch == 'armeabi-v7a':
return 7
elif arch == 'x86':
elif arch in ['arm64-v8a', 'x86', 'x86_64']:
return None
else:
raise Exception('Unknown arch: ' + arch)