Browse Source

fix clang-cl ldflag (#5805)

* fix clang-cl ldflag

* minor fix
Linpeng Zhang 10 months ago
parent
commit
3f0127bf98
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/c/catch2/xmake.lua

+ 2 - 2
packages/c/catch2/xmake.lua

@@ -69,7 +69,7 @@ package("catch2")
         end
         end
         component:add("links", link)
         component:add("links", link)
         if package:is_plat("windows") and package:version():le("3.0") then
         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")
                 component:add("ldflags", "-subsystem:console")
             elseif package:has_tool("cxx", "clang", "clangxx") then
             elseif package:has_tool("cxx", "clang", "clangxx") then
                 component:add("ldflags", "-Wl,/subsystem:console")
                 component:add("ldflags", "-Wl,/subsystem:console")
@@ -81,7 +81,7 @@ package("catch2")
         if package:version():ge("3.0") then
         if package:version():ge("3.0") then
             if package:is_plat("windows") then
             if package:is_plat("windows") then
                 local main_component = package:component("main")
                 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")
                     main_component:add("ldflags", "-subsystem:console")
                 elseif package:has_tool("cxx", "clang", "clangxx") then
                 elseif package:has_tool("cxx", "clang", "clangxx") then
                     main_component:add("ldflags", "-Wl,/subsystem:console")
                     main_component:add("ldflags", "-Wl,/subsystem:console")