summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua4
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)