diff options
| author | ruki <[email protected]> | 2024-02-18 23:13:07 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-18 23:13:07 +0800 |
| commit | 7e126bdbcc883f59c43ccc94eb80f2607d612ef0 (patch) | |
| tree | 3710acdd65808979e79829c5317a901a745bdcdc | |
| parent | dd27e3773f45ba36579c293078a254c81ff56611 (diff) | |
| parent | a07f210b30df69a55cddadaad75d46b1374f044c (diff) | |
Merge pull request #4718 from xmake-io/ccbin
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 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 |
