[clang-tools-extra] [clangd] Inject preceding includes for unity build targets (PR #180402)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 9 03:02:19 PST 2026


R-Goc wrote:

Is what the kernel does in any way different from what build systems like cmake do for unity builds? In cmake enabling the UNITY_BUILD target property generates files in this format:
unity_0_cxx.cxx:
```cpp
#include "source1.cpp"

#include "source2.cpp"
/*
...
*/
#include "sourceN.cpp"
```
If so, then I believe the scope this affects is way larger as unity builds are available in multiple build systems. iiuc what this does is propagate the includes from source1 etc. into the following files? 

https://github.com/llvm/llvm-project/pull/180402


More information about the cfe-commits mailing list