refactor(build): linker.cmd 由绝对路径改为裸名,--asan 提示文案去硬编码

- project.vpj / repl.vpj 的 linker.cmd 改为 clang++.exe,交由 PATH 解析

- main.vp 的 --asan 运行库提示改用占位符路径,并说明 clang64 根目录由 PATH 自动探测
This commit is contained in:
TermiNexus committed 2026-10-07 11:25:38 +08:00
1 parent 36d23d2f42
commit fb3d3787e6
3 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -389,9 +389,9 @@ Target: %s
# --asan requires the project to declare the ASan runtime in project.vpj linker.static_libs (no hardcoded paths); missing fails fast
if BuildPipeline._asan_mode != 0 and Config.asan_runtime_declared() == 0:
log.error("Enabling --asan requires declaring the ASan runtime in project.vpj's linker.static_libs:", "asan")
log.error(" D:/msys64/clang64/lib/clang/22/lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a", "asan")
log.error(" D:/msys64/clang64/lib/clang/22/lib/windows/libclang_rt.asan_dynamic_runtime_thunk-x86_64.a", "asan")
log.error("At runtime D:/msys64/clang64/bin (libclang_rt.asan_dynamic-x86_64.dll) must also be on PATH", "asan")
log.error(" <MSYS2>/clang64/lib/clang/<ver>/lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a", "asan")
log.error(" <MSYS2>/clang64/lib/clang/<ver>/lib/windows/libclang_rt.asan_dynamic_runtime_thunk-x86_64.a", "asan")
log.error("The clang64 root is auto-detected from PATH (see README section 8.1)", "asan")
return 1
# === --clean: remove temp, output and includes.binary directories ===
+1 -1
View File
@@ -13,7 +13,7 @@
]
},
"linker": {
"cmd": "D:/msys64/mingw64/bin/clang++.exe",
"cmd": "clang++.exe",
"flags": [
"-fuse-ld=lld",
"-lmsvcrt",
+1 -1
View File
@@ -12,7 +12,7 @@
]
},
"linker": {
"cmd": "D:/msys64/mingw64/bin/clang++.exe",
"cmd": "clang++.exe",
"flags": [
"-fuse-ld=lld",
"-lmsvcrt",