Skip to content

Commit

Permalink
Merge pull request #6027 from star-hengxing/autotools
Browse files Browse the repository at this point in the history
Fix cross compile with autotools on windows platform
  • Loading branch information
waruqi authored Jan 3, 2025
2 parents 1412583 + 4716576 commit cebadde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xmake/modules/package/tools/autoconf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cebadde

Please sign in to comment.