diff options
| author | ruki <[email protected]> | 2025-01-03 22:38:11 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-03 22:38:11 +0800 |
| commit | cebaddedcbf2f3ef8f30e47ffa52df9f528a1b72 (patch) | |
| tree | a171a19a715f5f9a12deb42efb93ec63c2632f81 /xmake/modules/package | |
| parent | 141258305d537a8688f4b32de3e2727a559eb083 (diff) | |
| parent | 47165762ccd790fa920f1315ec6407d3067e51f5 (diff) | |
Merge pull request #6027 from star-hengxing/autotools
Fix cross compile with autotools on windows platform
Diffstat (limited to 'xmake/modules/package')
| -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 8c800c190..4d2a404ed 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -425,10 +425,12 @@ function buildenvs(package, opt) name = name:gsub("gcc%-", "g++-") envs.CXX = dir and path.join(dir, name) or name end - elseif package:is_plat("windows") and not package:config("toolchains") then + end + if package:is_plat("windows") and not package:config("toolchains") then envs.PATH = os.getenv("PATH") -- we need to reserve PATH on msys2 envs = os.joinenvs(envs, _get_msvc(package):runenvs()) end + if is_host("windows") then envs.CC = _translate_windows_bin_path(envs.CC) envs.AS = _translate_windows_bin_path(envs.AS) |
