-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
android-ndk-26b文件目录变动导致编译结果有误 #4614
Comments
Title: android-ndk-26b file directory changes lead to incorrect compilation results |
试试, |
Try, |
一、xmake版本 二、xmake配置,只有ndk不一样,以下是编译运行测试程序 [----------] 2 tests from LogTest [----------] Global test environment tear-down (2)最新ndk:--ndk=D:\SDK\android-ndk-r26b 三、总结:load.lua可能还没有准确的判断ndk的变更。 |
贴下详细命令 和 -vD logs |
Post detailed commands and -vD logs |
PS E:\Work\CVFramework> xmake f -p android -a armeabi-v7a -m release --ndk=D:\SDK\android-ndk-r26b
build cache stats: [100%]: build ok, spent 6.906s |
-- set compile flags |
不是加进去了么。。看着没啥问题 |
Wasn't it added? . Looks like there's nothing wrong with it |
再试试,应该可以了, |
Try again, it should work, |
可以了吗?我怎么还不行 |
Is it ok? Why can't I do it? |
这边可以
|
你是的对的,是我另外一个动态库引起的 |
You are right, it was caused by another dynamic library of mine. |
I ran into this issue, I had to use Should I open a new issue? |
Did you try dev version? |
Yeah, I also tried |
you need pass |
Can I use |
dev version support it. |
@waruqi Will this change land in v2.8.7? |
2.8.7 will support it, or you can use set_config #4614 (comment) |
Xmake 版本
2.8.6
操作系统版本和架构
win11 x64
描述问题
set_config("ndk_cxxstl","c++_static")该设置编译结果还是要依赖libc++_shared.so,xmake -vD输出没有-lc++_static
和-static-libstdc++编译项。
对ndk的stdC++编译设置无效,应该是脚本判断ndk的\sources\cxx-stl文件夹失效,该文件夹在android-ndk-26b有变动,libc++更新。
期待的结果
期待静态链接libc++,实际是动态链接。
工程配置
set_config("ndk_cxxstl","c++_static")
set_config("ndk_sdkver","22")
附加信息和错误日志
PS E:\Work\CVFramework> xmake f -p android -a armeabi-v7a -m release --ndk=D:\SDK\android-ndk-r22 --ndk_cxxstl=c++_static
checking for Android SDK directory ... no
checking for NDK directory ... D:\SDK\android-ndk-r22
checking for SDK version of NDK ... 22
PS E:\Work\CVFramework> xmake -vD
checking for the shared library linker (sh) ... clang++
checking for the linker (ld) ... clang++
checking for clang++ ... D:\SDK\android-ndk-r22\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++
checking for the c++ compiler (cxx) ... clang++
checking for the c++ compiler (cxx) ... clang++
checking for the c++ compiler (cxx) ... clang++
checking for the c++ compiler (cxx) ... clang++
checking for the c++ compiler (cxx) ... clang++
checking for D:\SDK\android-ndk-r22\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ ... ok
checking for flags (-fPIC) ... ok
build cache stats:
cache directory: build.build_cache
cache hit rate: 0%
cache hit: 0
cache miss: 5
new cached files: 5
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
[100%]: build ok, spent 10.437s
The text was updated successfully, but these errors were encountered: