diff options
| author | ruki <[email protected]> | 2024-02-07 17:22:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-07 17:22:24 +0800 |
| commit | a07f210b30df69a55cddadaad75d46b1374f044c (patch) | |
| tree | a77d8a56fc92b0644b01fe6c6181c933138adb60 | |
| parent | 76558d21fd3277f5f8d7c43c69d0b24f68ca4acd (diff) | |
fix ccbin in compile_commands.lua
| -rw-r--r-- | xmake/plugins/project/clang/compile_commands.lua | 7 |
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 |
