mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
Running within the build sandbox has a number of disadvantages: - We have a separate clangd cache for each distribution/release combo - It requires to build the full image before clangd can be used - It breaks every time the image becomes out of date and requires a rebuild - We can't look at system headers as we don't have the knowledge to map them from inside the build sandbox to the corresponding path on the host Instead, let's have mkosi.clangd run clangd within the tools tree. We already require building systemd for both the host and the target anyway, and all the dependencies to build systemd are installed in the tools tree already for that, as well as clangd since it's installed together with the other clang tooling we install in the tools tree. Unlike the previous approach, this approach only requires the mkosi tools tree to be built upfront, which has a much higher chance of not invalidating its cache. We can also trivially map system header lookups from within the sandbox to the path within mkosi.tools on the host so that starts working as well.