
3 Nov
2010
3 Nov
'10
7:49 a.m.
Hi. In a project with Haskell + FFI, I recently split my C program into modules (files). I don't want to lose optimization though, so I want to use something like gcc -c -o complete.o -fwhole-program -combine *.c (doing whole program optimization/inlining etc., I hope). How do I write this in the cabal file? It seems ghc compiles each C source individually. Or should I use "-flto" on individual compilations? (That's what Gimple was invented for, actually?) But does this play nicely with ghc's linker? (Which is gcc, so it should be fine?) J.W.