Cat *.c >tmp.c && gcc -O3 -fwhole-program $YOURFLAGS -o ohmygawditsfast tmp.c

12 points by mrpixel ↗ HN
This will get you warp-speed if there're no clashes. -Os instead of -O3 makes another wet dream come true (guess which).

7 comments

[ 2.7 ms ] story [ 25.7 ms ] thread
It's not a C compilers, but Mlton is an interesting SML whole program compiler. There's also JHC for Haskell which is nifty but can't quite compile all Haskell programs. I also found the Stalin Scheme compiler very interesting since it seems like a whole program compiler for a dynamically typed language like Scheme should be able to do a lot of interesting things.
Why not just pass *.c to gcc ? Same thing isn't it?
I'm afraid it's not. GCC still compiles them separately. It generates a bunch of object files in /tmp and links them as usual.
Thanks, didn't know that. I thought it would have been the same.