4 ms·
Is it open source, and can you post a link? I have never seen this type of project even link in 1 second.
by tom_ 5y ago
Is it open source, and can you post a link? I have never seen this type of project even link in 1 second.
- jcelerier 5y agosure, it's https://ossia.io https://ossia.io. Here's a video of my edit-compile-run cycle: https://streamable.com/az397y https://streamable.com/az397y To get to something that fast for incremental builds of course requires some tweaks from the buildsystem defaults: - clang instead of gcc (I use clang on mac, windows, linux) - ninja instead of make - -gsplit-dwarf for debug info - mold instead of ld (I used lld before which was already nice but mold is bewildering) - PCH (very easy with cmake thankfully !) - split in shared libraries of adequate granularity, e.g. the software is split in ~40 plug-ins (although with mold I'm not sure this is even relevant anymore, the complete link step if I don't use shared libraries is not that slow). I've encoded most of these in my cmake toolchain-generator, cninja: https://github.com/jcelerier/cninja/ https://github.com/jcelerier/cninja/ To give some reference, my hardware is a 8c/16t intel 6900k. Edit: I did a complete build with everything statically linked instead of through shared libraries. To give a reference: lld (which is already fast compared to GNU ld and gold) links the entire software in 0.47 seconds ; mold links it in 0.3
- nottorp 5y agoIs there anything left out of the "standard" setup? :) > split in shared libraries of adequate granularity, e.g. the software is split in ~40 plug-ins So you had to alter your project structure to improve build times?
- jcelerier 5y ago> Is there anything left out of the "standard" setup? :) I don't believe in accepting things just because some engineer choose a default under some deadline 25 years ago > So you had to alter your project structure to improve build times? no, the software was designed as-is from the very beginning (and it's an architecture I'd recommend for any software which is supposed to be extensible from its very inception, it worked out very well)
- nottorp 5y ago> I don't believe in accepting things just because some engineer choose a default under some deadline 25 years ago That's not the point. The point is the "standard" is suboptimal enough that you basically have to change it. Don't think that applies to much of the competition (with the exception of Java that isn't really competition?).
- jcelerier 5y ago> The point is the "standard" is suboptimal enough that you basically have to change it. but there's no standard, just CMake defaults that I change ? It's not more standard to call /usr/bin/clang++ than /usr/bin/g++ (and if I was running freebsd instead of linux, as far as I know that's what would happen by default) ; likewise, other build systems like Meson use ninja by default (and that does not make ninja any more of a standard than make is when using cmake under GNU/Linux). Those are just tools in a toolbox.