-
Notifications
You must be signed in to change notification settings - Fork 113
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
compile_commands.json doesnt find system headers. #221
Comments
Curerrent compile command commit: "1e08f8e0507b6b6b1f4416a9a22cf5c28beaba93" (HEAD) |
Hacking out a local repo, that injects -isystem for each builtin directory seems to work. Though have to strip nested external, since it seems that external repositories that depend on each other end up generating nested external paths. external/repo1/external/repo2/path_to_bin.
|
I'm using https://github.com/bazel-contrib/toolchains_llvm to set up the toolchain the project should use and making sure everything looks right. Everything compiles, and the compile_commands.json seems to generated, mostly correct. Except that the system headers (libc, libc++, etc) are being pulled from the host instead from the bazel-.../external/toolchain_ path. So C++20 headers are not found.
There is no sysroot flag on the compile_commands, so I will assume that make clangd use whatever the host is using.
Is there something else I need to set?
The text was updated successfully, but these errors were encountered: