Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

"Concatenated" builds seem to be the best band-aid for this. Concatenate as many source files as possible before compiling, #include a bunch of cpp files into one big file. It makes tracking down errors slightly harder and macros a bit more risky, but greatly improves the overall build efficiency.


And trashes incremental compilation time, which is what really matters.


It's a balance, but on many projects the overhead of the headers themselves is so large that concatenating a few .cpp files together doesn't increase incremental compilation time significantly over simply building each .cpp file in isolation.


Incremental compilation opportunities are rarer than we'd like on C++: as soon as you add a new class member or function, that's potentially a huge recompile.


You can have all the files you're working on not concatenated.


That's painfully manual.


It doesn't need to be. I think it shouldn't be hard to make a build script that re-makes the bundles except for files modified in the last hour.


Also called unity build sometimes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: