Skip to content

Building Cmm with -g3 is broken

When compiling .cmm sources with --enable-debug-info=3 Cabal will invoke GHC with -optc-g3 to GHC. GHC then passes this to the C compiler when preprocessing the source. This is problematic since cpp retains #define directives in its output when invoked with -g3, which confuses the C-- lexer.

I think the best way to fix this is to prevent Cabal from passing -optc-g3 to GHC, although I'm not entirely sure.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information