diff options
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/clang/compile_commands.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua index 2167981b4..f6cd3bac4 100644 --- a/xmake/plugins/project/clang/compile_commands.lua +++ b/xmake/plugins/project/clang/compile_commands.lua @@ -256,10 +256,11 @@ function _make_target(jsonfile, target) -- enter package environments local oldenvs = os.addenvs(target:pkgenvs()) - -- TODO - -- disable precompiled header first - target:set("pcheader", nil) - target:set("pcxxheader", nil) + -- we enable it for clangd, @see https://github.com/xmake-io/xmake/issues/2818 + if not lsp or lsp ~= "clangd" then + target:set("pcheader", nil) + target:set("pcxxheader", nil) + end -- build source batches for _, sourcebatch in pairs(target:sourcebatches()) do |
