bazel-compile-commands-extractor icon indicating copy to clipboard operation
bazel-compile-commands-extractor copied to clipboard

compile_commands.json doesnt find system headers.

Open Zeed-gn opened this issue 1 year ago • 5 comments

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?

Zeed-gn avatar Sep 19 '24 15:09 Zeed-gn