3 ms·
It has nothing to do with "custom C code". Any tool with a custom language (or equivalent) that wants a runtime JIT for the language and code compilable to LLVM
by erichocean 14y ago
It has nothing to do with "custom C code". Any tool with a custom language (or equivalent) that wants a runtime JIT for the language and code compilable to LLVM IR would need to link in the compiler libs to do that. Custom DSLs are everywhere.
For example, OpenShadingLanguage compiles shaders on the fly as part of a physically-based renderer, and then JITs them at runtime with LLVM. Linked in are the LLVM libs and a bunch of C code that is converted to LLVM IR and accessed by the shaders. The whole lot is linked and JITd together, enabling interprocedural analysis, inlining and a bunch of other compiler optimizations (e.g. constant folding). The resulting shaders are about 25% faster than their previous, hand-coded C shaders.
IOW, lots of products benefit from having a compiler toolchain at runtime they can link with their program. GPL license or not, GCC isn't made to do that.