Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross compile with autotools on windows platform #6027

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading