summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-12-01 09:05:29 +0800
committerGitHub <[email protected]>2023-12-01 09:05:29 +0800
commit8404a2822d32e3d953cd87d16d21640635bd353e (patch)
treefdc1651953389166bba228e493e187413215a248
parent67b89a225d57eefa768c9323cadbe7794dbff9af (diff)
parent522dac17e58f964da97499724189e7e0f5bf57e9 (diff)
Merge pull request #4451 from A2va/toolchain-runenv
Add toolchain runenvs in run action
-rw-r--r--xmake/modules/private/action/run/runenvs.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/private/action/run/runenvs.lua b/xmake/modules/private/action/run/runenvs.lua
index 9f1473335..1a7ba05ac 100644
--- a/xmake/modules/private/action/run/runenvs.lua
+++ b/xmake/modules/private/action/run/runenvs.lua
@@ -58,6 +58,14 @@ function _make_runpath_on_windows(target)
end
insert_target(dep)
end
+ for _, toolchain in ipairs(target:toolchains()) do
+ local runenvs = toolchain:runenvs()
+ if runenvs and runenvs.PATH then
+ for _, env in ipairs(path.splitenv(runenvs.PATH)) do
+ insert(env)
+ end
+ end
+ end
end
end