diff options
| author | ruki <[email protected]> | 2023-09-16 22:26:33 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-16 22:26:33 +0800 |
| commit | 64554c05207b5aa952d250729c9b66dd2a11f5fa (patch) | |
| tree | ec01d0d18ae7a7662c579df98a1deaa8f8670dba | |
| parent | 408aaa7524e2bf60e440f9a7413d8ef5b73cf215 (diff) | |
| parent | f5a10629bbb669cfdd43f0af0ebe3eebd858e513 (diff) | |
Merge pull request #4205 from mohabouje/master
LLVM toolchain is installed in a different path for ARM cpus
| -rw-r--r-- | xmake/toolchains/llvm/check.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index f63418cc8..0f3943013 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -61,7 +61,12 @@ function main(toolchain) if is_host("linux") and os.isfile("/usr/bin/llvm-ar") then sdkdir = "/usr" elseif is_host("macosx") then - local bindir = find_path("llvm-ar", "/usr/local/Cellar/llvm/*/bin") + local bindir + if os.arch() == "arm64" then + bindir = find_path("llvm-ar", "/opt/homebrew/opt/llvm/bin") + else + bindir = find_path("llvm-ar", "/usr/local/Cellar/llvm/*/bin") + end if bindir then sdkdir = path.directory(bindir) end |
