summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-07 17:22:24 +0800
committerGitHub <[email protected]>2024-02-07 17:22:24 +0800
commita07f210b30df69a55cddadaad75d46b1374f044c (patch)
treea77d8a56fc92b0644b01fe6c6181c933138adb60 /xmake/plugins
parent76558d21fd3277f5f8d7c43c69d0b24f68ca4acd (diff)
fix ccbin in compile_commands.lua
Diffstat (limited to 'xmake/plugins')
-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 136de4bf1..ffe06a807 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