summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)