diff options
| author | ruki <[email protected]> | 2024-05-06 17:07:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-06 17:07:43 +0800 |
| commit | 55716912ce7b5b8c9a45994e4bc7b0814b03ef61 (patch) | |
| tree | 3a04f47881341a1bd8c7d57f13ebc2e102c61a02 /xmake/toolchains/llvm/check.lua | |
| parent | a85e4aa3048cc909b5e70ece7bc61c7d59f57c9d (diff) | |
Update check.lua
Diffstat (limited to 'xmake/toolchains/llvm/check.lua')
| -rw-r--r-- | xmake/toolchains/llvm/check.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index 9bbebac84..cee19baac 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -76,11 +76,13 @@ function main(toolchain) elseif is_host("windows") then bindir = try {function () return path.directory(os.iorunv("where", {"llvm-ar.exe"})) end} if not bindir then - local paths = os.getenv("PATH"):split(';') - for i, v in ipairs(paths) do - if os.isfile(path.join(v, "llvm-ar.exe")) then - bindir = v - break + local pathenv = os.getenv("PATH") + if pathenv then + for _, v in ipairs(path.splitenv(pathenv)) do + if os.isfile(path.join(v, "llvm-ar.exe")) then + bindir = v + break + end end end end |
