patch applied (cabal): add --enable-optimization/--disable-optimization config options (on by default)

Donald Bruce Stewart dons at
Mon Feb 12 18:51:38 EST 2007

> On Sun, 2007-02-11 at 16:46 -0800, Ross Paterson wrote:
> > Sun Feb 11 16:45:13 PST 2007  Ross Paterson <ross at>
> >   * add --enable-optimization/--disable-optimization config options (on by default)
> > 
> >     M ./Distribution/Setup.hs +9
> >     M ./Distribution/Simple/Configure.hs +1
> >     M ./Distribution/Simple/GHC.hs +1
> >     M ./Distribution/Simple/LocalBuildInfo.hs +1
> >     M ./doc/Cabal.xml +18
> This is great (I kept meaning to get round to it!) but I'm not sure it
> should be on by default. Certainly it should be used by cabal-install
> since that is a user tool for installing a package, but developers use
> the Seyup.hs or cabal-setup tools directly and they will not want -O to
> be on by default I think. If they were building it to install then
> they'd use the other tool, so if they're using the dev tool then it's
> likely because they want to do some development work and so will want a
> shorter build time.

I think developers can be expected to read the docs and turn off
optimisations if they like. Everyone else should get -O by default, to
avoid bad press ;-)

it's easy enough for a developer to alias 

    build="runhaskell Setup --disable-optimization"

-- Don

More information about the cabal-devel mailing list