summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-07-01 10:31:35 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-07-01 10:44:12 +0100
commit0103e19533647da6e9aa81345b9f656198690995 (patch)
tree052d5a65135fa265bc70d6878c3c4bf89e447c3a
parent70e47489f1fa87a0ee5656950c00b54f69823fc6 (diff)
downloadhaskell-wip/21803.tar.gz
hadrian: Don't read package environments in ghc-stage1 wrapperwip/21803
The stage1 compiler may be on the brink of existence and not have even a working base library. You may have installed packages globally with a similar stage2 compiler which will then lead to arguments such as --show-iface not even working because you are passing too many package flags. The solution is simple, don't read these implicit files. Fixes #21803
-rw-r--r--hadrian/src/Rules/Generate.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index 33a392fc33..8fcb8e4e00 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -235,6 +235,7 @@ ghcWrapper stage = do
return $ unwords $ map show $ [ ghcPath ]
++ (if stage == Stage1
then ["-no-global-package-db"
+ , "-package-env=-"
, "-package-db " ++ dbPath
]
else [])