summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/tools/find_link.lua3
1 files changed, 2 insertions, 1 deletions
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"