4 ms·
Great work on the self-hosted (no llvm) compiler and linker ! Is there somebody that can explain to me the value of incremental compilation? How is this diffe
by vitaminCPP 2y ago
Great work on the self-hosted (no llvm) compiler and linker !
Is there somebody that can explain to me the value of incremental compilation?
How is this different than CMake caching, for example?
- squeek502 2y agoMy understanding is that Zig's incremental compilation will work on a much more granular level (i.e. functions, etc), so, for example, change one function and only that function (and its dependencies) will get recompiled/relinked (there's some linker trickery involved to avoid needing to relink everything IIUC). More details here: https://ziggit.dev/t/how-zig-incremental-compilation-is-implemented-internally/3543/2 https://ziggit.dev/t/how-zig-incremental-compilation-is-impl...
- vitaminCPP 2y agoThanks for sharing !
- robinei 2y agoWhy would the function's dependencies need recompilation? I guess the dependees may require it, if they inlined it, or if the signature changed.
- squeek502 2y agoI'm probably not describing it fully accurately. See the link for the proper explanation.