diff options
| author | ruki <[email protected]> | 2022-03-30 22:47:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-30 22:47:07 +0800 |
| commit | 7a156e25b9663fbcb3fcd0e938d2d6c967e427fa (patch) | |
| tree | 8602e0dc793d6c682e923a18d7f093be90b23237 /xmake/modules/package/tools/autoconf.lua | |
| parent | 8b12860707afe1c56d977d736caec981d92638b9 (diff) | |
improve autoconf
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index a960789ce..5ec69aaf8 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -261,7 +261,12 @@ function buildenvs(package, opt) elseif package:is_plat("cross") or package:has_tool("ar", "ar") then -- only for cross-toolchain envs.CXX = package:build_getenv("cxx") - if not envs.ARFLAGS or envs.ARFLAGS == "" then + local ar = envs.AR + if ar then + ar = path.filename(ar) + end + -- only for cross-xxx-ar, @see https://github.com/xmake-io/xmake-repo/pull/1119 + if ar and ar:find('-', 1, true) and (not envs.ARFLAGS or envs.ARFLAGS == "") then envs.ARFLAGS = "-cr" end end |
