There is now libgccjit that aims at allowing to embed gcc https://gcc.gnu.org/onlinedocs/jit/
There is an alternative backend to rustc that relies on it.
There is an alternative backend to rustc that relies on it.
One big problem with libgccjit, despite its fairly bad compile-time performance, is that it's GPL-licensed and thereby makes the entire application GPL, which makes it impossible to use not just in proprietary use-cases but also in cases where incompatible licenses are involved.