This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add CompileFlags.Compiler option to override argv0
ClosedPublic

Authored by sammccall on Dec 22 2021, 4:29 PM.

Details

Summary

This is separate from --query-driver but can combine with it.

Fixes https://github.com/clangd/clangd/issues/642

Diff Detail

Event Timeline

sammccall created this revision.Dec 22 2021, 4:29 PM
sammccall requested review of this revision.Dec 22 2021, 4:29 PM
nridge added a subscriber: nridge.Dec 25 2021, 9:28 PM
kadircet accepted this revision.Jan 4 2022, 1:35 AM

thanks!

clang-tools-extra/clangd/ConfigFragment.h
140

not sure if query-driver interactions is worth explaining here

143

i am also afraid of this :/ in theory json compilation database already drops well-known wrappers and users that use another medium to communicate flags should be responsible of taking care of this, so hopefully it won't bite us badly

This revision is now accepted and ready to land.Jan 4 2022, 1:35 AM
sammccall marked 2 inline comments as done.Jan 4 2022, 2:37 AM
sammccall added inline comments.
clang-tools-extra/clangd/ConfigFragment.h
140

I suspect this is the main reason that people will want to set this :-(
Since they need to get two things right before they see any change, I think some reassurance might help.
We could move this to an external guide though.

143

Yeah. Anyway this is fixable if we need to fix it, it's just annoying to need the list of strings to skip over in two places.

This revision was automatically updated to reflect the committed changes.
sammccall marked 2 inline comments as done.