summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2025-10-16 09:56:25 +0800
committerGitHub <[email protected]>2025-10-16 09:56:25 +0800
commitac6062dda4021036d3dc7868231f2e66becb3ebb (patch)
tree98b8b53554ee1eea71d1b3333ae9a0e94d1306f9 /xmake/rules/c++/modules
parent110846f5a3d8b0672d537e115ad60ebedecf534e (diff)
parent69db6466018292f9eadc914bf374096a4028c678 (diff)
Merge pull request #6931 from Arthapz/add-fallback-clang-scan-deps
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