From 78c5465cdbc234d7d7be3bfc76b6304767aefa44 Mon Sep 17 00:00:00 2001 From: star9029 Date: Mon, 22 Dec 2025 17:40:34 +0800 Subject: Fix runenvs --- xmake/modules/private/utils/toolchain.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.3.1