Open myzhan opened 3 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Cannot enable ASan on windows vs2022
xmake f -k static --policies=build.sanitizer.address -p windows -a x64 --vs=2022 --vw_toolset=14.0
这个 toolset 版本支持?我记得是从 v142 工具链开始
vw_toolset 参数也不对。。没这个名字。只有 vs_toolset
另外,提供下 -vD logs
Bot detected the issue body's language is not English, translate it automatically.
The vw_toolset parameter is also incorrect. . There is no such name. only vs_toolset
In addition, provide -vD logs
vw_toolset 参数也不对。。没这个名字。只有 vs_toolset
另外,提供下 -vD logs
sorry,我手打笔误。按照 @star-hengxing 的指引,我把 toolset 改成 14.2。能识别这个参数了,但是编译报错。
修改完 toolset 后的命令
xmake f -p windows -a x64 -k static -y --vs=2019 --vs_toolset=14.2 --policies=build.sanitizer.address -vD
依赖 lua,所以 xmake f 的时候会先编译 lua,编译报错。
日志如下 log.txt
Bot detected the issue body's language is not English, translate it automatically.
The vw_toolset parameter is also incorrect. . There is no such name. only vs_toolset
In addition, provide -vD logs
Sorry, I made a typo. Following @star-hengxing's guidance, I changed the toolset to 14.2. This parameter can be recognized, but the compilation error is reported.
Command after modifying toolset
xmake f -p windows -a x64 -k static -y --vs=2019 --vs_toolset=14.2 --policies=build.sanitizer.address -vD
It depends on lua, so when xmake f is used, lua will be compiled first, and an error will be reported during compilation.
The log is as follows log.txt
继续升级 vs toolset,能编译成功了。
xmake f -p windows -a x64 -k static -y --vs=2022 --vs_toolset=14.4 --policies=build.sanitizer.address -vD
运行的时候报错,看起来跟 xmake 没关系,我继续查 ASan 的兼容性列表。
==4304==AddressSanitizer: detect_leaks is not supported on this platform
Xmake 版本
2.9.2
操作系统版本和架构
Windows11 家庭版 23H2
描述问题
{force = true}
or callset_policy("check.auto_ignore_flags", false)
if you want to set it.期待的结果
xmake 配合 vs2022 可以使用 ASan
工程配置
无
附加信息和错误日志
无