diff options
| author | ruki <[email protected]> | 2023-09-25 22:44:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-25 22:44:35 +0800 |
| commit | 822140a5e8cdc53cc03448a54da94628b6389749 (patch) | |
| tree | 8bd081bc03ee71df262efe51b262bc512b0150eb | |
| parent | bff91f6b065fdf8c1c906cc195c57817864130f1 (diff) | |
improve to llvm toolchain
| -rw-r--r-- | xmake/toolchains/llvm/check.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index 0f3943013..7c2a30cd9 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -58,7 +58,10 @@ function main(toolchain) local sdkdir = toolchain:sdkdir() local bindir = toolchain:bindir() if not sdkdir and not bindir then - if is_host("linux") and os.isfile("/usr/bin/llvm-ar") then + bindir = try {function () return os.iorunv("llvm-config", {"--bindir"}) end} + if bindir then + sdkdir = path.directory(bindir) + elseif is_host("linux") and os.isfile("/usr/bin/llvm-ar") then sdkdir = "/usr" elseif is_host("macosx") then local bindir |
