diff options
| author | ruki <[email protected]> | 2022-03-19 22:32:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-19 22:32:45 +0800 |
| commit | 9e37fafc56c2a8bba0f252365840718121c0856a (patch) | |
| tree | e00937496a40133ccbbf3687f446ed284a21bf0d /xmake/modules/package/tools/autoconf.lua | |
| parent | 1eb05ad60e90585b7f3273c5d51416ad19be72b4 (diff) | |
improve tools/autoconf
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 52fa22415..da83bc7d9 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -282,10 +282,12 @@ function buildenvs(package, opt) end -- we need use clang++ as cxx, autoconf will use it as linker -- https://github.com/xmake-io/xmake/issues/2170 - if cxx and package:has_tool("cxx", "clang") then + if cxx and package:has_tool("cxx", "clang", "gcc") then local dir = path.directory(cxx) local name = path.filename(cxx) name = name:gsub("clang$", "clang++") + name = name:gsub("clang%-", "clang++-") + name = name:gsub("gcc%-", "g++-") envs.CXX = dir and path.join(dir, name) or name end end |
