From 894ec447955a5066faee1b87af9cc7785ae14cd8 Mon Sep 17 00:00:00 2001 From: Andrey Mokhov Date: Tue, 16 Apr 2019 02:22:30 +0100 Subject: Hadrian: Generate GHC wrapper scripts This is a temporary workaround for #16534. We generate wrapper scripts /ghc-stage1 and /ghc-stage2 that can be used to run Stage1 and Stage2 GHCs with the right arguments. See https://gitlab.haskell.org/ghc/ghc/issues/16534. --- hadrian/src/Rules.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'hadrian/src/Rules.hs') diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs index d9fa167b50..78e3790d48 100644 --- a/hadrian/src/Rules.hs +++ b/hadrian/src/Rules.hs @@ -83,7 +83,12 @@ topLevelTargets = action $ do targets <- concatForM buildStages $ \stage -> do packages <- stagePackages stage mapM (path stage) packages - need targets + + -- Why we need wrappers: https://gitlab.haskell.org/ghc/ghc/issues/16534. + root <- buildRoot + let wrappers = [ root -/- ("ghc-" ++ stageString s) | s <- [Stage1 ..] + , s < finalStage ] + need (targets ++ wrappers) where -- either the package database config file for libraries or -- the programPath for programs. However this still does -- cgit v1.2.1