summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-12-22 17:40:34 +0800
committerGitHub <[email protected]>2025-12-22 17:40:34 +0800
commit78c5465cdbc234d7d7be3bfc76b6304767aefa44 (patch)
tree46eb0b775ff17d17e1a9c25557c353b36cfb3083
parent05ad043eaf740be73dd0b95b6d5ab97a4d82ac59 (diff)
Fix runenvs
-rw-r--r--xmake/modules/private/utils/toolchain.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/toolchain.lua b/xmake/modules/private/utils/toolchain.lua
index 25ada449c..8ccaf05d1 100644
--- a/xmake/modules/private/utils/toolchain.lua
+++ b/xmake/modules/private/utils/toolchain.lua
@@ -471,7 +471,8 @@ function add_llvm_runenvs(toolchain)
-- Currently, runenvs maybe have Visual Studio environment variables.
-- If the Clang path is not prioritized (placed first), the system incorrectly loads the MSVC ASan DLL, resulting in a runtime failure.
local runenvs = toolchain:get("runenvs")
- if runenvs and runenvs["PATH"]then
+ if runenvs and runenvs["PATH"] then
+ runenvs["PATH"] = table.wrap(runenvs["PATH"])
table.insert(runenvs["PATH"], 1 , dir)
else
toolchain:add("runenvs", "PATH", dir)