fix the detection method of `GNU iconv` (#4708)

* fix the detection method of `GNU iconv`

* revert the use of `detect:has_*`, and add `linux clang` support for GNU iconv
c8ef-patch-benchmark
zjyhjqs 8 months ago committed by GitHub
parent 94acda8148
commit 5304191c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/l/libiconv/xmake.lua

@ -19,8 +19,8 @@ package("libiconv")
on_fetch("macosx", "linux", function (package, opt)
if opt.system then
if package:is_plat("linux") and package:has_tool("cc", "gcc", "gxx") then
return {} -- on linux libiconv is already a part of glibc
if package:is_plat("linux") and package:has_tool("cc", "gcc", "gxx", "clang", "clangxx") then
return {} -- libiconv is already a part of glibc (GNU iconv)
else
return package:find_package("system::iconv", {includes = "iconv.h"})
end

Loading…
Cancel
Save