summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-10-15 20:16:14 +0200
committerArthur LAURENT <[email protected]>2025-10-15 20:26:19 +0200
commit69db6466018292f9eadc914bf374096a4028c678 (patch)
treed4abccee2fcea50673757ff771be4048bf191f48 /xmake/rules/c++/modules
parent2413b8e465f4866e32a259f0a3a82ba9c54d3b99 (diff)
fix(C++ modules) if toolchain clang-scan-deps is not installed, fallback to system wide clang-scan-deps if available
Diffstat (limited to 'xmake/rules/c++/modules')
-rw-r--r--xmake/rules/c++/modules/clang/support.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/clang/support.lua b/xmake/rules/c++/modules/clang/support.lua
index 11c2f9a67..faebd5213 100644
--- a/xmake/rules/c++/modules/clang/support.lua
+++ b/xmake/rules/c++/modules/clang/support.lua
@@ -228,6 +228,10 @@ function get_clang_scan_deps(target)
program = path.join(dir, program)
end
local result = find_tool("clang-scan-deps", {program = program, version = true})
+ if not result then
+ -- find a system wide alternative
+ result = find_tool("clang-scan-deps", {version = true})
+ end
if result then
clang_scan_deps = result.program
end