diff options
| author | Mohammed Boujemaoui <[email protected]> | 2023-09-16 15:53:32 +0200 |
|---|---|---|
| committer | Mohammed Boujemaoui <[email protected]> | 2023-09-16 15:53:32 +0200 |
| commit | f5a10629bbb669cfdd43f0af0ebe3eebd858e513 (patch) | |
| tree | ed8744325be407f1fc8112da13163b0f3d234d4f | |
| parent | 808816f0e51751ad3d6913f6e5494802e81b23e8 (diff) | |
Refactoring after PR to keep consistency with existing codebase
| -rw-r--r-- | xmake/toolchains/llvm/check.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmake/toolchains/llvm/check.lua b/xmake/toolchains/llvm/check.lua index 621faddf9..0f3943013 100644 --- a/xmake/toolchains/llvm/check.lua +++ b/xmake/toolchains/llvm/check.lua @@ -61,16 +61,14 @@ function main(toolchain) if is_host("linux") and os.isfile("/usr/bin/llvm-ar") then sdkdir = "/usr" elseif is_host("macosx") then + local bindir if os.arch() == "arm64" then - local bindir = find_path("llvm-ar", "/opt/homebrew/opt/llvm/bin") - if bindir then - sdkdir = path.directory(bindir) - end + bindir = find_path("llvm-ar", "/opt/homebrew/opt/llvm/bin") else - local bindir = find_path("llvm-ar", "/usr/local/Cellar/llvm/*/bin") - if bindir then - sdkdir = path.directory(bindir) - end + bindir = find_path("llvm-ar", "/usr/local/Cellar/llvm/*/bin") + end + if bindir then + sdkdir = path.directory(bindir) end end end |
