summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Boujemaoui <[email protected]>2023-09-16 15:53:32 +0200
committerMohammed Boujemaoui <[email protected]>2023-09-16 15:53:32 +0200
commitf5a10629bbb669cfdd43f0af0ebe3eebd858e513 (patch)
treeed8744325be407f1fc8112da13163b0f3d234d4f
parent808816f0e51751ad3d6913f6e5494802e81b23e8 (diff)
Refactoring after PR to keep consistency with existing codebase
-rw-r--r--xmake/toolchains/llvm/check.lua14
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