summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-07-01 10:31:35 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-04 15:15:00 -0400
commit3b13aab14589823744495306bfb4c7bb522d22a5 (patch)
treea39f780b7004caf1b87a9d51a6538f40848e5209
parent36fba0dfa2ecbd27b575dea09e4c3cdd6cb99b37 (diff)
downloadhaskell-3b13aab14589823744495306bfb4c7bb522d22a5.tar.gz
hadrian: Don't read package environments in ghc-stage1 wrapper
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 [])