summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-01-04 14:36:14 +0800
committerGitHub <[email protected]>2025-01-04 14:36:14 +0800
commit9cb2e63b9e2e52e5b3b1ddc8314d236f076b9116 (patch)
tree7806735194f2ab90d2f22ba0a332367bb11c3421
parentf6478356bcf482fa41b06de19c0e9b257003816a (diff)
parentb7b66ad47fefa0eab4f0ed17c646527449044c08 (diff)
Merge pull request #6036 from SirLynix/patch-18
Fix run environment for mingw
-rw-r--r--xmake/core/package/package.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index f5c38f337..068e95ab6 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1073,13 +1073,13 @@ function _instance:_rawenvs()
envs.PATH = table.wrap(bindirs)
elseif self:is_binary() then
envs.PATH = {"bin"}
- elseif os.host() == "windows" and self:is_plat("windows", "mingw") and self:is_arch(os.arch()) and self:config("shared") then
+ elseif os.host() == "windows" and self:is_plat("windows", "mingw") and not self:is_cross() and self:config("shared") then
-- bin/*.dll for windows
envs.PATH = {"bin"}
end
-- add LD_LIBRARY_PATH to load *.so directory
- if os.host() ~= "windows" and self:is_plat(os.host()) and self:is_arch(os.arch()) and self:config("shared") then
+ if os.host() ~= "windows" and self:is_plat(os.host()) and not self:is_cross() and self:config("shared") then
envs.LD_LIBRARY_PATH = {"lib"}
if os.host() == "macosx" then
envs.DYLD_LIBRARY_PATH = {"lib"}