From 54945ddfa8c78753d41ca0e82c4bd8c1816f9c53 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 26 Sep 2024 00:01:55 +0800 Subject: fix clang-cl toolchain #5658 --- xmake/modules/detect/tools/find_link.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/modules/detect/tools/find_link.lua b/xmake/modules/detect/tools/find_link.lua index fedea7b6d..c79b2e52a 100644 --- a/xmake/modules/detect/tools/find_link.lua +++ b/xmake/modules/detect/tools/find_link.lua @@ -51,7 +51,8 @@ function main(opt) -- -- TODO maybe we can use ml to improve it else - local cl = assert(find_tool("cl", {envs = opt.envs})) + local is_clang_cl = toolchain and toolchain:name() == "clang-cl" + local cl = assert(find_tool(is_clang_cl and "clang-cl" or "cl", {envs = opt.envs})) -- make an stub source file local binaryfile = os.tmpfile() .. ".exe" -- cgit v1.3.1