4 ms·
Code needs to be compiled, but it isn't required to build everything from scratch whenever someone touches a source file. Except for C++, where a tiny change i
by ge0rg 9y ago
Code needs to be compiled, but it isn't required to build everything from scratch whenever someone touches a source file.
Except for C++, where a tiny change in a single object will require recompiling every file that transitively includes that object's header.
- pjmlp 9y agoDepends on the change and the though given to header file dependencies. PIMPL, forward declarations, pre-compiled headers, binary libraries are all tools to reduce such dependencies.
- sqeaky 9y agoI think that only re-linking should be required if you only change source files and not headers. Headers implicitly convey are the sizes, inheritance and other stuff that dependencies need for compilation. I suppose you could have some extra aggressive optimizations that force inlining, but I haven't seen a need for this, even in game dev.