From 3f0127bf98b035ce3002e7adffd12d91f244124f Mon Sep 17 00:00:00 2001 From: Linpeng Zhang <94288976+Arteiimis@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:29:18 +0800 Subject: [PATCH] fix clang-cl ldflag (#5805) * fix clang-cl ldflag * minor fix --- packages/c/catch2/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/c/catch2/xmake.lua b/packages/c/catch2/xmake.lua index a7a6015b5..e65a5242b 100644 --- a/packages/c/catch2/xmake.lua +++ b/packages/c/catch2/xmake.lua @@ -69,7 +69,7 @@ package("catch2") end component:add("links", link) if package:is_plat("windows") and package:version():le("3.0") then - if package:has_tool("cxx", "cl") then + if package:has_tool("cxx", "cl", "clang-cl") then component:add("ldflags", "-subsystem:console") elseif package:has_tool("cxx", "clang", "clangxx") then component:add("ldflags", "-Wl,/subsystem:console") @@ -81,7 +81,7 @@ package("catch2") if package:version():ge("3.0") then if package:is_plat("windows") then local main_component = package:component("main") - if package:has_tool("cxx", "cl") then + if package:has_tool("cxx", "cl", "clang-cl") then main_component:add("ldflags", "-subsystem:console") elseif package:has_tool("cxx", "clang", "clangxx") then main_component:add("ldflags", "-Wl,/subsystem:console")