Closed roachsinai closed 2 years ago
You have a project that builds with MSVC but want to have a compilation database with clang commands. Why would that be useful?
It sounds like a messy problem that is probably impossible to solve in a general sense. It would involve mapping command-line arguments between compilers. Obviously that mapping is not complete (some MSVC flags have no Clang equivalent), but even if it were, it would not make sense to pass the same parameters (e.g. system headers, libc/STL headers, will differ between the compilers).
You have a project that builds with MSVC but want to have a compilation database with clang commands. Why would that be useful?
Yes, I'm trying use vim in Windows with some MSVC project, most needed function is intelligence completion provided by language server protocol. Your repo give me the hope.
It sounds like a messy problem that is probably impossible to solve in a general sense. It would involve mapping command-line arguments between compilers. Obviously that mapping is not complete (some MSVC flags have no Clang equivalent), but even if it were, it would not make sense to pass the same parameters (e.g. system headers, libc/STL headers, will differ between the compilers).
Agree with this, too. Maybe no need to add too much compile flag/arguments to let lsp works. I'll check whether this is possible when absolute perfect mapping not must.
Thanks for your quick reply!
Ah, ok. In that case it probably just cares about a few specific flags (e.g. CPP defines, include paths, forced includes, language standards, etc.), so it may be practical to build a bunch of replacements to handle those. I'm not sure it makes sense as part of this project however.
@0xabu Yes, agree with the last sentence. Thanks!
Hi, @0xabu this repo is very useful to export msvc compile commands.
But could it support export change
cl.exe
toclang++
?Thanks again for this repo!