Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译后静态库体积大 #202

Closed
izxyz opened this issue Jul 24, 2023 · 2 comments
Closed

编译后静态库体积大 #202

izxyz opened this issue Jul 24, 2023 · 2 comments

Comments

@izxyz
Copy link

izxyz commented Jul 24, 2023

luajit2.1.0-beat3:763kb
openresty-luajit2:6614kb
编译环境ubuntu20.04交叉编译安卓版静态库

脚本
NDK=/home/xyz/android-ndk-r14b
NDKABI=24
NDKVER=$NDK/toolchains/aarch64-linux-android-4.9 #注意匹配实际版本号
NDKP=$NDKVER/prebuilt/linux-x86_64/bin/aarch64-linux-android- #注意匹配实际路径
NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm64"
make HOST_CC="gcc" CROSS=$NDKP TARGET_FLAGS="$NDKF"

@zhuizhuhaomeng
Copy link
Contributor

应该是编译带上了调试信息,你需要把调试信息strip掉。
没有调试信息,出现问题调试非常不方便。

@zhuizhuhaomeng
Copy link
Contributor

如果实在不想要调试信息,可以把 -g 选项去掉

@izxyz izxyz closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants