Skip to content

Commit

Permalink
Merge pull request #5064 from MaxwellGengYF/dev
Browse files Browse the repository at this point in the history
Support windows find LLVM toolchain
  • Loading branch information
waruqi authored May 6, 2024
2 parents 3fc1f39 + 5571691 commit 2ca0fde
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions xmake/toolchains/llvm/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ function main(toolchain)
if bindir then
sdkdir = path.directory(bindir)
end
elseif is_host("windows") then
bindir = try {function () return path.directory(os.iorunv("where", {"llvm-ar.exe"})) end}
if not bindir then
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
if bindir then
sdkdir = path.directory(bindir)
end
end
end

Expand Down

0 comments on commit 2ca0fde

Please sign in to comment.