diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 5d9f38e300bbfd01ae3efa2474b1a1b51dda6140..1425b9798a0e8defa4bd63a1868f0504d9491039 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -107,7 +107,16 @@ packageArgs = do , compilerStageOption ghcDebugAssertions ? arg "-DDEBUG" ] , builder (Cabal Flags) ? mconcat - [ expr ghcWithInterpreter `cabalFlag` "internal-interpreter" + [ + -- When cross compiling, enable for stage0 to get ghci + -- support. But when not cross compiling, disable for + -- stage0, otherwise we introduce extra dependencies + -- like haskeline etc, and mixing stageBoot/stage0 libs + -- can cause extra trouble (e.g. #25406) + expr ghcWithInterpreter ? + ifM (expr cross) + (arg "internal-interpreter") + (notStage0 `cabalFlag` "internal-interpreter") , ifM stage0 -- We build a threaded stage 1 if the bootstrapping compiler -- supports it.