Closed MaxwellGengYF closed 3 days ago
试下,应该可以了,这个跟 cache 没啥关系,是 clang-cl toolchain 的问题。。
因为 msvc/clang-cl 都是用的 link.exe ,但是探测 find_link 需要调用 cl/clang-cl 去尝试编译+ link
切到 clang-cl toolchain 后,envs 被加载为 clang-cl的环境,cl.exe 不在 PATH 里,所以之前 find_link 固定用 cl.exe 去探测,就会出这个问题,导致 link.exe 没找到。
Bot detected the issue body's language is not English, translate it automatically.
Try it, it should work. This has nothing to do with the cache, it is a problem with the clang-cl toolchain. .
Because msvc/clang-cl all use link.exe, but to detect find_link you need to call cl/clang-cl to try to compile + link
After switching to the clang-cl toolchain, envs is loaded as the clang-cl environment, and cl.exe is not in the PATH. Therefore, before find_link was fixed to use cl.exe to detect, this problem will occur, causing link.exe not to be found.
Xmake 版本
v2.9.5+dev.21e4c2a3a
操作系统版本和架构
Windows
描述问题
同项目使用 cross compile 导致 can not find program ar
期待的结果
正常编译。
工程配置
附加信息和错误日志
error: cannot get program for ar