-
Herbert Valerio Riedel authored
The flag `-outputdir` sets `-odir`, `-hidir`, `-stubdir`, and `-dumpdir`. Using `-outputdir` has the benefit of redirecting all output files with only one flag to a temporary directory. Cabal currently only sets the first three but not the `-dumpdir` flag for compiling Haskell modules, which clutters the top-level package directory and sometimes dump files get overwritten if their names collide for different build targets. This minimal commit merely adds the `ghcOptOutputDir` flag to the data structures and enables its use for the compilation of Haskell modules. A later commit may remove the use of the now redundant `ghcOptStubDir` and `ghcOptHiDir` flags in favor of the new `ghcOptOutputDir` flag. The flag `-outputdir` is available since GHC 6.10; see also ghc/ghc@bb074cb7 and http://ghc.haskell.org/trac/ghc/ticket/2295
b2697010