andoridNDK 交叉编译链构建(2020年04月26日)

1、下载新版NDK下载

https://developer.android.google.cn/ndk/downloads/index.html

2. 构建步骤:

(1)

cd  xx/android-ndk-xxxx/build/tools

(2)

NDK提供了两个脚步用于一键化构建gcc工具链:
make-standalone-toolchain.sh
make_standalone_toolchain.py
(3)构建命令:
./make_standalone_toolchain.py --arch arm64 --api 24 --unified-headers --install-dir ~/android-build

 

(4)构建参数:

—arch : 交叉编译目标平台
--unified-header: 使用libc头文件,相关解释可参考:
Https://android.googlesource.com/platform/ndk.git/+/ndk-r14-release/docs/UnifiedHearders.md
—api: Android系统版本
--install-dir:生成的交叉编译工具链输出位置,可自行设置
 

 

posted @ 2020-04-26 11:31  LLSix  阅读(351)  评论(0编辑  收藏  举报