fix clang-cl ldflag (#5805)

* fix clang-cl ldflag

* minor fix
autoupdate-astc-encoder-5.1.0
Linpeng Zhang 6 days ago committed by GitHub
parent 34a98b7225
commit 3f0127bf98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      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")

Loading…
Cancel
Save