-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure all commands in compilation_commands.json use absolute paths. #3415
Conversation
By placing the `where_is_program` call into this function, all references to the compiler will be made absolute, instead of just ones in the top environment. Previously, all references to the compiler for user source code would not use the full path in the compilation database, which broke `clangd`'s detection of system includes.
Could you provide a simple project or steps how to reproduce this issue? |
Sure. To recreate the issue:
The generated file will end with an entry for The rest of the entries (for library code / framework code) correctly have entries like (the strange paths are because I did this in a docker container, but the issue still occurs outside of one) |
Thank you so much! |
What is your use case for |
I use it for completion with vim and clangd (ccls didn't work for other projects) |
Does it work well? |
With this patch, and the appropriate command line flags ( |
By placing the
where_is_program
call into this function, all references to the compiler will be made absolute, instead of just ones in the top environment. For example, previously all references to the compiler for user source code would not use the full path in the compilation database, which brokeclangd
's detection of system includes.