ghc --make -odir x -hidir x chooses strange location for x

Simon Marlow
Thu, 24 Oct 2002 10:30:59 +0100

> >Which static options in particular do you need to change?
> Just the usual suspects: -package mostly for me, the occasional
> -O for sources from folks who have figured out which of their many
> files really need/profit from optimisation.

I'd argue that -package is a global option and should stay that way.
The only reason you might want to disable -package for certain modules
and not others is if you want to do some tricks with module shadowing -
and this definitely isn't supported in GHC.  You should pass the same
-package to every compilation.

The optimisation options are a different matter.  I agree, they really
should be dynamic.

> Was interesting to look at the list again, though - in my memory,
> the list of static flags was longer than it actually turns out to be.
> -package seems to be the only one left that really hurts..
> Well, and the lower level equivalents, of course: -i, -l, -L (these=20
> would be especially useful in combination with ghci: just have=20
> everything in one file, pass it to ghci and get going..).

Arguably -I should be dynamic, but I don't think it does much harm being
static. =20

I think -i is a global option in the same sense as -package, though.

The library options -l and -L don't really matter, since they're only
used at link time and you wouldn't want to put them in OPTIONS anyhow.