libgccjit is a library but is used as a compiler. So it references a bunch of compiler things in $out. To avoid a cycle, we need to put everything in $out, so referenced to $lib need to be replaced with ${!outputLib}.