Skip to content

Commit

Permalink
Update check.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored May 6, 2024
1 parent a85e4aa commit 5571691
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions xmake/toolchains/llvm/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5571691

Please sign in to comment.