Adding JIT-compilation to a toy interpreter with libgccjit
9 points by rtpg
9 points by rtpg
I keep wondering: who is actually using libgccjit? It sees very little activity/maintanance (log on GitHub, cgit currently returns 429), is GPLv3+ (so the entire application must be GPLv3, too), requires binutils (as, ld) during execution (GCC can only emit textual assembly, ld is needed to create a .so for dlopen), and doesn't support multi-threading (at most one compilation at a time). I've never benchmarked it due to the previous reasons, but I would be surprised if this is not slower than LLVM.
The only users I know of are Emacs (GNU) and rustc_codegen_gcc, which doesn't actually use it (or, rather, their downstream fork) for JIT compilation but as a more usable API to generate GIMPLE.
Ouch, didn’t see the license. I read that it’s built as a shared library and jumped to the conclusion that it’s LGPL.