diff options
| author | ruki <[email protected]> | 2025-12-23 22:42:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-23 22:42:38 +0800 |
| commit | e0c5f68ea4892333ca4a4b10362f1e9aa8ce9118 (patch) | |
| tree | d1e0749124dc6d1108e550a36640655ebff58ed0 /xmake/modules/private/utils | |
| parent | f5adbc00fad0f91ccb820856a859a5223d9080e9 (diff) | |
improve llvm/clang toolchain
Diffstat (limited to 'xmake/modules/private/utils')
| -rw-r--r-- | xmake/modules/private/utils/toolchain.lua | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/xmake/modules/private/utils/toolchain.lua b/xmake/modules/private/utils/toolchain.lua index cd2f20736..af165080f 100644 --- a/xmake/modules/private/utils/toolchain.lua +++ b/xmake/modules/private/utils/toolchain.lua @@ -467,16 +467,7 @@ function add_llvm_runenvs(toolchain) for _, dir in ipairs({dirs.libdir or false, dirs.cxxlibdir or false, dirs.rtlibdir or false}) do if dir then if toolchain:is_plat("windows") or is_host("windows") then - -- The dynamic libraries (DLLs) for Clang ASan and MSVC ASan share the same filename, making them incompatible. - -- 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 - runenvs["PATH"] = table.wrap(runenvs["PATH"]) - table.insert(runenvs["PATH"], 1, dir) - else - toolchain:add("runenvs", "PATH", dir) - end + toolchain:add("runenvs", "PATH", dir) elseif toolchain:is_plat("linux", "bsd") then toolchain:add("runenvs", "LD_LIBRARY_PATH", dir) elseif toolchain:is_plat("macosx") then |
