summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-26 00:28:58 +0800
committerGitHub <[email protected]>2024-09-26 00:28:58 +0800
commit74a69b0beab63ea29471bac920ad6d58fc2ca06d (patch)
tree7ae0314ce763ced21fd5a9a543117af27e3c85db
parent2a4c217a263dd0f774f2fc1e17182ee5e58a63a2 (diff)
parent54945ddfa8c78753d41ca0e82c4bd8c1816f9c53 (diff)
Merge pull request #5661 from xmake-io/clangcl
fix clang-cl toolchain #5658
-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"