Cleanly setting C compiler options when building RTS

Matthew Pickering matthewtpickering at
Thu Jul 11 09:49:49 UTC 2019

Hi Siddharth,

The correct way is to create a custom flavour with something like the
following in.

grts = quickFlavour { name = "grts", args = args quickFlavour <>
(builder Cc ? package rts ? arg "-g3" <> arg "-O0") }



On Thu, Jul 11, 2019 at 10:20 AM Siddharth Bhat <siddu.druid at> wrote:
> Hello all,
> I was interested in building the GHC RTS with GCC's AddressSanitizer and Ubsan enabled.
> What I want to do very specifically is to pass "-fsanitize=address -fsanitize=undefined" when compiling the RTS.
> What's the "correct" way to set this up in the build system? Is there a configure flag? Do I need to change the Shake script?
> Thanks,
> ~Siddharth
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

More information about the ghc-devs mailing list