Skip to content

Commit 2410312

Browse files
committed
ndk use r19c
1 parent 1c72b7b commit 2410312

6 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/build all libs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- uses: nttld/setup-ndk@v1
9393
id: setup-ndk
9494
with:
95-
ndk-version: r27c
95+
ndk-version: r19c
9696
add-to-path: true
9797
local-cache: false
9898
- name: Checkout code

.github/workflows/build custom libs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: nttld/setup-ndk@v1
6161
id: setup-ndk
6262
with:
63-
ndk-version: r27c
63+
ndk-version: r19c
6464
add-to-path: true
6565
local-cache: false
6666
- name: Checkout code

.github/workflows/build one lib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- uses: nttld/setup-ndk@v1
9696
id: setup-ndk
9797
with:
98-
ndk-version: r27c
98+
ndk-version: r19c
9999
add-to-path: true
100100
local-cache: false
101101
- name: Checkout code

configs/meson-crossfiles/armv7a-android.meson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[binaries]
2-
c = 'armv7a-linux-androideabi21-clang'
3-
cpp = 'armv7a-linux-androideabi21-clang++'
2+
c = 'armv7a-linux-androideabi19-clang'
3+
cpp = 'armv7a-linux-androideabi19-clang++'
44
ar = 'llvm-ar'
55
strip = 'llvm-strip'
66
ranlib = 'llvm-ranlib'

do-compile/android/openssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ case $_MR_ARCH in
5050
;;
5151
esac
5252

53-
CFG_FLAGS="no-shared no-engine no-apps no-dynamic-engine no-static-engine \
53+
CFG_FLAGS="no-shared no-engine no-dynamic-engine no-static-engine \
5454
no-dso no-ui-console no-tests \
5555
--prefix=$MR_BUILD_PREFIX \
5656
--openssldir=$MR_BUILD_PREFIX \

tools/export-android-build-env.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# https://developer.android.com/ndk/guides/abis?hl=zh-cn#cmake_1
1919

2020

21-
export MR_ANDROID_API=21
21+
export MR_ANDROID_API=19
2222

2323
case $_MR_ARCH in
2424
*v7a)
@@ -32,11 +32,20 @@ case $_MR_ARCH in
3232
export MR_ANDROID_ABI=x86
3333
;;
3434
x86_64)
35+
# -lt 代表 less than(小于)
36+
if [[ $MR_ANDROID_API -lt 21 ]]; then
37+
export MR_ANDROID_API=21
38+
fi
3539
export MR_TRIPLE=x86_64-linux-android$MR_ANDROID_API
3640
export MR_FF_ARCH=x86_64
3741
export MR_ANDROID_ABI=x86_64
3842
;;
3943
arm64*)
44+
# 64 位 ARM 架构是从 Android 5.0(API 21)才开始诞生的
45+
# -lt 代表 less than(小于)
46+
if [[ $MR_ANDROID_API -lt 21 ]]; then
47+
export MR_ANDROID_API=21
48+
fi
4049
export MR_TRIPLE=aarch64-linux-android$MR_ANDROID_API
4150
export MR_FF_ARCH=aarch64
4251
export MR_ANDROID_ABI=arm64-v8a
@@ -67,7 +76,8 @@ export MR_STRINGS=${CROSS_PREFIX_WITH_PATH}strings
6776
export MR_STRIP=${CROSS_PREFIX_WITH_PATH}strip
6877
export MR_LIPO=${CROSS_PREFIX_WITH_PATH}lipo
6978
# ffmpeg can't use triple target clang
70-
export MR_TRIPLE_CC=${MR_TOOLCHAIN_ROOT}/bin/${MR_TRIPLE}-clang
79+
# export MR_TRIPLE_CC=${MR_TOOLCHAIN_ROOT}/bin/${MR_TRIPLE}-clang
80+
export MR_TRIPLE_CC=${MR_TOOLCHAIN_ROOT}/bin/clang
7181
export MR_TRIPLE_CXX=${MR_TRIPLE_CC}++
7282
# find clang from NDK toolchain
7383
export MR_CC=${MR_TOOLCHAIN_ROOT}/bin/clang

0 commit comments

Comments
 (0)