From 9a5eac4ea931de5f9dbcfff4921e77fb77a86b9b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Sep 2023 15:09:38 +0200 Subject: [PATCH] python/build/toolchain: set arch=llvm_triple --- python/build/openssl.py | 2 +- python/build/toolchain.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/python/build/openssl.py b/python/build/openssl.py index 2bf542c5b..953220ec9 100644 --- a/python/build/openssl.py +++ b/python/build/openssl.py @@ -36,7 +36,7 @@ class OpenSSLProject(MakeProject): # to know where the SDK is, but our own build scripts # prepared everything already to look like a regular Linux # build - 'arm-linux-androideabi': 'linux-generic32', + 'armv7a-linux-androideabi': 'linux-generic32', 'aarch64-linux-android': 'linux-aarch64', 'i686-linux-android': 'linux-x86-clang', 'x86_64-linux-android': 'linux-x86_64-clang', diff --git a/python/build/toolchain.py b/python/build/toolchain.py index 3e615286f..bfde287f5 100644 --- a/python/build/toolchain.py +++ b/python/build/toolchain.py @@ -4,30 +4,26 @@ from typing import Union android_abis = { 'armeabi-v7a': { - 'arch': 'arm-linux-androideabi', + 'arch': 'armv7a-linux-androideabi', 'ndk_arch': 'arm', - 'llvm_triple': 'armv7-linux-androideabi', 'cflags': '-fpic -mfpu=neon -mfloat-abi=softfp', }, 'arm64-v8a': { 'arch': 'aarch64-linux-android', 'ndk_arch': 'arm64', - 'llvm_triple': 'aarch64-linux-android', 'cflags': '-fpic', }, 'x86': { 'arch': 'i686-linux-android', 'ndk_arch': 'x86', - 'llvm_triple': 'i686-linux-android', 'cflags': '-fPIC -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32', }, 'x86_64': { 'arch': 'x86_64-linux-android', 'ndk_arch': 'x86_64', - 'llvm_triple': 'x86_64-linux-android', 'cflags': '-fPIC -m64', }, } @@ -60,7 +56,7 @@ class AndroidNdkToolchain: self.install_prefix = install_prefix llvm_path = os.path.join(ndk_path, 'toolchains', 'llvm', 'prebuilt', build_arch) - llvm_triple = abi_info['llvm_triple'] + android_api_level + llvm_triple = arch + android_api_level common_flags = '-Os -g' common_flags += ' ' + abi_info['cflags']