This is exactly GCC's architecture as well, where front-ends are transpiled into a generic language, which is then compiled into native code for a given platform.
http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
The wiki has links to some plugins too http://gcc.gnu.org/wiki/plugins