关于 --ndk_cxxstl 选项的疑问 #4240
twinstar6980
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
出于一些原因需要编译一份静态链接 stl 的程序到手机上执行,但用
--ndk_cxxstl=c++_shared
和--ndk_cxxstl=c++_static
编译出来的程序都是动态链接 libc++_shared 的,我看了下 ndk 的文档发现是要额外设置个选项,在 lua 里添加add_ldflags('-static-libstdc++')
后才能编译出静态链接的程序。这样的话,xmake 提供 ndk_cxxstl 选项有什么用吗?指定 c++_shared 或 c++_static 出来的都是动态链接,为什么不在
--ndk_cxxstl=c++_static
的情况下自动添加-static-libstdc++
?有什么考量吗?Beta Was this translation helpful? Give feedback.
All reactions