Update Hadrian
[ghc.git] / hadrian / src / Environment.hs
1 module Environment (setupEnvironment) where
2
3 import System.Environment
4
5 -- | The build system invokes many external builders whose behaviour is
6 -- influenced by the environment variables. We need to modify some of them
7 -- for better robustness of the build system.
8 setupEnvironment :: IO ()
9 setupEnvironment = do
10 -- ghc-cabal refuses to work when GHC_PACKAGE_PATH is set (e.g. by Stack)
11 unsetEnv "GHC_PACKAGE_PATH"
12
13 -- in MinGW if PWD is set to a Windows "C:\\" style path then configure
14 -- `pwd` will return the Windows path, and then modifying $PATH will fail.
15 -- See https://github.com/snowleopard/hadrian/issues/189 for details.
16 unsetEnv "PWD"