The g-ir-compiler sets g_log_always_fatal() for warnings
The g-ir-compiler loads installed gio modules (I guess to find typelibs). This can lead to various warnings or even worse, critical messages.
One such example is: you currently can not compile xfce4 on a build machine w/o $DISPLAY being set (see https://bugzilla.xfce.org/show_bug.cgi?id=15122).
First try to fix that bug was to replace the g_crtical() in that module by g_warning() - but that still makes the compiler fail. Since (in normal operation) that condition is a serious issue (the module is effectively useless in that state), it makes no sense to further reduce the log level, but it also makes no sense to abort the compiler process.
I would suggest at least to allow for WARNING level messages to not be fatal.