瀏覽代碼

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
zjyhjqs 1 年之前
父節點
當前提交
5304191c14
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/l/libiconv/xmake.lua

+ 2 - 2
packages/l/libiconv/xmake.lua

@@ -19,8 +19,8 @@ package("libiconv")
 
 
     on_fetch("macosx", "linux", function (package, opt)
     on_fetch("macosx", "linux", function (package, opt)
         if opt.system then
         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
             else
                 return package:find_package("system::iconv", {includes = "iconv.h"})
                 return package:find_package("system::iconv", {includes = "iconv.h"})
             end
             end