You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The compile_commands.json generated by xmake doesn't help language servers like clangd find C++20 module files. My project with C++20 modules compiles fine, but clangd can't find imported modules, so it complains.
Describe the solution you'd like
Extend compile_commands.json generation to tell the compiler where modules can be found.
For clang on linux, adding -fprebuilt-module-path=build/.gens/test/linux/x86_64/release/rules/modules/cache to the compile_commands.json generated by xmake works. clangd behaves as expected after doing this.
I see how this is implemented in build_modules/clang.lua:
Is your feature request related to a problem? Please describe.
The
compile_commands.json
generated by xmake doesn't help language servers likeclangd
find C++20 module files. My project with C++20 modules compiles fine, butclangd
can't find imported modules, so it complains.Describe the solution you'd like
Extend
compile_commands.json
generation to tell the compiler where modules can be found.For
clang
on linux, adding-fprebuilt-module-path=build/.gens/test/linux/x86_64/release/rules/modules/cache
to thecompile_commands.json
generated by xmake works.clangd
behaves as expected after doing this.I see how this is implemented in
build_modules/clang.lua
:I'm just not sure how to make the
compile_commands.json
generation code use this...Describe alternatives you've considered
I wasn't sure whether this was a bug report or feature request, so I don't see another way to fix this problem.
The text was updated successfully, but these errors were encountered: