summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-18 23:13:07 +0800
committerGitHub <[email protected]>2024-02-18 23:13:07 +0800
commit7e126bdbcc883f59c43ccc94eb80f2607d612ef0 (patch)
tree3710acdd65808979e79829c5317a901a745bdcdc
parentdd27e3773f45ba36579c293078a254c81ff56611 (diff)
parenta07f210b30df69a55cddadaad75d46b1374f044c (diff)
Merge pull request #4718 from xmake-io/ccbin
fix ccbin in compile_commands.lua
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index 7c6514161..e3dbe9520 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -131,6 +131,13 @@ function _translate_arguments(arguments)
if v and v:find(' ', 1, true) then
arg = f .. "\"" .. v .. "\""
end
+ elseif arg:startswith("-ccbin=") then
+ -- @see https://github.com/xmake-io/xmake/issues/4716
+ local f = arg:sub(1, 7)
+ local v = arg:sub(8)
+ if v then
+ arg = f .. v:gsub("\\\\", "\\")
+ end
end
end
if arg == "-I" then