This is probably not possible, but I still want to ask. I'm using Clangd as an autocompletion engine for VSCode. It works great, but there is one problem.
The official Windows binaries of Clang rely on MSVC standard library headers. If MSVC is not installed, Clang and Clangd complain about missing headers.
There's a flag that makes Clang use MinGW's libstdc++ (--target=x86_64-w64-windows-gnu
), which I have to include in compile_commands.json
.
This solution works, but it would be nice to have sensible autocomplete even without compile_commands.json
.
Is there a way I can tell Clangd to assume --target=x86_64-w64-windows-gnu
if there is no compile_commands.json
?