Skip to content

Commit

Permalink
android/build.py: support the x86 ABI
Browse files Browse the repository at this point in the history
First commit for issue #69
  • Loading branch information
MaxKellermann committed Mar 4, 2018
1 parent ea55220 commit 8266ab5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion android/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@
'armeabi-v7a': {
'arch': 'arm-linux-androideabi',
'ndk_arch': 'arm',
'toolchain_arch': 'arm-linux-androideabi',
'llvm_triple': 'armv7-none-linux-androideabi',
'cflags': '-march=armv7-a -mfpu=vfp -mfloat-abi=softfp',
},

'x86': {
'arch': 'i686-linux-android',
'ndk_arch': 'x86',
'toolchain_arch': 'x86',
'llvm_triple': 'i686-none-linux-android',
'cflags': '-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32',
},
}

# select the NDK target
Expand Down Expand Up @@ -71,7 +80,7 @@ def __init__(self, tarball_path, src_path, build_path,
self.install_prefix = install_prefix
self.sysroot = sysroot

toolchain_path = os.path.join(ndk_path, 'toolchains', arch + '-' + gcc_version, 'prebuilt', build_arch)
toolchain_path = os.path.join(ndk_path, 'toolchains', abi_info['toolchain_arch'] + '-' + gcc_version, 'prebuilt', build_arch)
llvm_path = os.path.join(ndk_path, 'toolchains', 'llvm', 'prebuilt', build_arch)
llvm_triple = abi_info['llvm_triple']

Expand Down
5 changes: 5 additions & 0 deletions python/build/libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
[
'--disable-shared', '--enable-static',
],

edits={
# this option is not understood by clang
'configure': lambda data: data.replace('-mno-ieee-fp', ' '),
}
)

opus = AutotoolsProject(
Expand Down

0 comments on commit 8266ab5

Please sign in to comment.