diff options
| author | ruki <[email protected]> | 2022-03-05 20:43:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-05 20:43:32 +0800 |
| commit | 967769fd1463912ff301b468d333adfab67c0c26 (patch) | |
| tree | 191f597a5d2000ec70639b4e76c9cc6da535ec73 /xmake/modules/package/tools/autoconf.lua | |
| parent | 824bba3286c79e2969214924cdb78a59778cefcc (diff) | |
improve tools/autoconf
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 9cd684551..2cd0c33f9 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -265,6 +265,20 @@ function buildenvs(package, opt) envs.ARFLAGS = "-cr" end end + + -- fix autoconf cannot use clang/clang++ as linker + -- + -- @see + -- https://github.com/xmake-io/xmake-repo/pull/1043 + -- https://github.com/libexpat/libexpat/issues/312 + local ld = envs.LD + if ld and package:has_tool("ld", "clangxx", "clang") then + local dir = path.directory(ld) + local name = path.filename(ld) + name = name:gsub("clang%+%+", "ld") + name = name:gsub("clang", "ld") + envs.LD = dir and path.join(dir, name) or name + end end local ACLOCAL_PATH = {} local PKG_CONFIG_PATH = {} |
