-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
toolchains
configuration option in add_requires
does not take effect on Windows.
#5069
Comments
It works for me. $ xmake f --mode=debug --arch=x64 --toolchain=clang-cl -c -v
checking for d3d12-memory-allocator ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> d3d12-memory-allocator v2.0.1 [toolchains:"msvc", runtimes:"MT"] <------ still msvc
please input: y (y/n/m) |
no toolchain configs now. https://github.com/JX-Master/LunaSDK/blob/a43a6711242abf8658d407c53d0889bb6a746e98/xmake.lua#L80 And I add msvc, it still works for me. add_requires("d3d12-memory-allocator", {configs = {toolchains = "msvc"}}) PS C:\Users\wangrunqing\Downloads\LunaSDK> xmake f --mode=debug --contract_assertion=y --thread_safe_assertion=y --arch=x64 --toolchain=clang-cl -c -v --rhi_debug=y --rhi_api=D3D12 --shared=y
> checking for c links(d3d12-memory-allocator)
> checking for c snippet(find_package/d3d12-memory-allocator)
checking for d3d12-memory-allocator ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> miniaudio 0.11.21
-> stb 2023.12.15
-> spirv-cross 1.3.268+0 [runtimes:"MT", toolchains:"clang-cl"]
-> glfw 3.4 [runtimes:"MT", toolchains:"clang-cl"]
-> d3d12-memory-allocator v2.0.1 [runtimes:"MT", toolchains:"msvc"] <-------------- msvc
please input: y (y/n/m) |
I tried your project, it works on ci too. https://github.com/waruqi/LunaSDK/actions/runs/8997613472 patch |
The main branch of LunaSDK is locked to Xmake v2.8.9 to prevent CI failure. It can be seen here: https://github.com/waruqi/LunaSDK/actions/runs/8997613472/job/24716094811
Run |
I switched to dev and latest 2.9.1 version, it still works. |
I have confirmed that this issue will be affected by CI caching configuration. That says, if the xmake is configured using existing cache in To make this problem occur every time, caching in Then this problem should occur every time. |
this patch should work. #5076 |
you can try dev branch on ci. |
Confimed fixed on |
Xmake Version
2.9.1
Operating System Version and Architecture
Windows 10, clang-cl
Describe Bug
On
xmake.lua
, I set one specific packaged3d12-memory-allocator
to be built usingmsvc
like so:The full xmake script can be seen here: https://github.com/JX-Master/LunaSDK/blob/0218180058a1cc068e523cec5f3e17294e4938ef/xmake.lua#L80C5-L80C78
Then I configure the project using the following commands:
It seems that make will still use
clang-cl
to buildd3d12-memory-allocator
instead ofmsvc
, even if the toolchain is explicitly specified, which caues compile errors. The full error log can be seen here:https://github.com/JX-Master/LunaSDK/actions/runs/8979206373/job/24660823551
Expected Behavior
The specified package,
d3d12-memory-allocator
, should be compiled using msvc instead of clang-cl according to the configuation, even if the host project itself is built using clang-cl.Project Configuration
https://github.com/JX-Master/LunaSDK/blob/0218180058a1cc068e523cec5f3e17294e4938ef/xmake.lua#L80C5-L80C78
Additional Information and Error Logs
https://github.com/JX-Master/LunaSDK/actions/runs/8979206373/job/24660823551
The text was updated successfully, but these errors were encountered: