xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.87k stars 776 forks source link

需要支持arm64ec #5313

Closed Ritchie1108 closed 2 months ago

Ritchie1108 commented 2 months ago

你在什么场景下需要该功能?

本机已安装win11sdk, vs2022, 用xmake创建arm64ec项目的时候报错

描述可能的解决方案

麻烦支持

描述你认为的候选方案

No response

其他信息

xmake f -c -vD -m release -a arm64ec checking for platform ... windows checking for Microsoft Visual Studio (arm64ec) version ... no checkinfo: cannot runv(clang.exe --version), No such file or directory checking for clang ... no checkinfo: cannot runv(zig.exe version), No such file or directory checking for zig ... no checkinfo: cannot runv(zig.exe version), No such file or directory checking for zig ... no checkinfo: cannot runv(nim.exe --version), No such file or directory checking for nim ... no checkinfo: cannot runv(nim.exe --version), No such file or directory checking for nim ... no error: @programdir\core\main.lua:329: @programdir\actions\config\main.lua:157: target(detours): toolchain not found! stack traceback: [C]: in function 'error' [@programdir\core\base\os.lua:973]: in function 'raiselevel' [@programdir\core\sandbox\modules\utils.lua:143]: in function 'assert' [@programdir\actions\config\main.lua:157]: in function '_check_target_toolchains' [@programdir\actions\config\main.lua:403]: [C]: in function 'xpcall' [@programdir\core\base\utils.lua:275]: [@programdir\core\base\task.lua:491]: in function 'run' [@programdir\core\main.lua:327]: in function 'cotask' [@programdir\core\base\scheduler.lua:406]:

stack traceback: [C]: in function 'error' @programdir\core\base\os.lua:973: in function 'base/os.raiselevel' (...tail calls...) @programdir\core\main.lua:329: in upvalue 'cotask' @programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Need to support arm64ec

star-hengxing commented 2 months ago

https://devblogs.microsoft.com/cppblog/arm64ec-support-in-visual-studio 看起来找 msvc 工具链需要加新的参数,然后编译链接再加个新参数就可以用了,感觉需要定义为一个 plat 而不是 arch?

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


https://devblogs.microsoft.com/cppblog/arm64ec-support-in-visual-studio It seems that you need to add new parameters to the msvc tool chain, and then compile and link and add new parameters to use it. I feel that it needs to be defined as a plat instead of an arch?

Ritchie1108 commented 2 months ago

https://devblogs.microsoft.com/cppblog/arm64ec-support-in-visual-studio 看起来找 msvc 工具链需要加新的参数,然后编译链接再加个新参数就可以用了,感觉需要定义为一个 plat 而不是 arch?

不过按照目前xmake的习惯, 感觉加在arch更合适一点, 不过不排除是我自己使用方式的问题 https://learn.microsoft.com/en-us/cpp/build/reference/machine-specify-target-platform?view=msvc-170

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


https://devblogs.microsoft.com/cppblog/arm64ec-support-in-visual-studio It seems that you need to add new parameters to the msvc tool chain, and then compile and link and add new parameters to use. It feels like it needs to be defined. For a plat instead of an arch?

However, according to the current xmake habits, I feel that it is more appropriate to add it to arch, but I cannot rule out that it is a problem with my own usage. https://learn.microsoft.com/en-us/cpp/build/reference/machine-specify-target-platform?view=msvc-170

waruqi commented 2 months ago

支持了,https://github.com/xmake-io/xmake/pull/5316

https://devblogs.microsoft.com/cppblog/arm64ec-support-in-visual-studio 看起来找 msvc 工具链需要加新的参数,然后编译链接再加个新参数就可以用了,感觉需要定义为一个 plat 而不是 arch?

arch 足够,没必要搞这么复杂

waruqi commented 2 months ago

再试试,xmake update -s dev

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


Try again, xmake update -s dev