[PATCH] D138546: Clangd: Preserve target flags in system includes extractor
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 25 02:54:31 PST 2022
kadircet added a comment.
Sorry for noticing this so late. Yes the initial reason we left `sysroot` and `std/builtin-inc` related flags were exactly that, in theory they could vary but in practice they were applied to all or none of the project.
Regarding this change itself, surely preserving target makes sense and similar to sysroot and others, i'd actually expect it to be the same across all files in practice. But they're more likely to change without a clangd restart (e.g. because user invokes build in a different configuration). So i think they should be part of the cache key nevertheless. My main question about this change is, you seem to be using a `clang` driver underneath. Why is clang driver we have in clangd not able to infer the same search paths etc? Is the clang provided in android ndk a custom clang? can you provide logs in the issue you've mentioned above, especially the compile flags retrieved from CDB and cc1 produced by it?
Regarding the mishandling of `-isysroot<dir>` vs `-isysroot <dir>` (they still both have a single `-`, but expecting an equals in between is a mistake apparently), surely we should fix that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138546/new/
https://reviews.llvm.org/D138546
More information about the cfe-commits
mailing list