diff options
| -rw-r--r-- | xmake/plugins/project/clang/compile_commands.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua index 04416439a..70692eef4 100644 --- a/xmake/plugins/project/clang/compile_commands.lua +++ b/xmake/plugins/project/clang/compile_commands.lua @@ -44,8 +44,10 @@ function _translate_arguments(arguments) if idx == 1 and is_host("windows") and path.extension(arg) == "" then arg = arg .. ".exe" end - if arg:startswith("-isystem", 1, true) then - arg = arg:replace("-isystem", "-I") + if arg:startswith("-isystem-after", 1, true) then + arg = "-I" .. arg:sub(13, -1) + elseif arg:startswith("-isystem", 1, true) then + arg = "-I" .. arg:sub(9, -1) elseif arg:find("[%-/]external:I") then arg = arg:gsub("[%-/]external:I", "-I") elseif arg:find("[%-/]external:W") or arg:find("[%-/]experimental:external") then |
