Commit b0fdd7fe authored by Alp Mestanogullari's avatar Alp Mestanogullari Committed by Marge Bot

hadrian: fix _build/ghc-stage1 to make it callable from any directory

parent 821bece9
Pipeline #9973 failed with stages
in 471 minutes and 27 seconds
......@@ -209,8 +209,9 @@ emptyTarget = vanillaContext (error "Rules.Generate.emptyTarget: unknown stage")
ghcWrapper :: Stage -> Expr String
ghcWrapper Stage0 = error "Stage0 GHC does not require a wrapper script to run."
ghcWrapper stage = do
dbPath <- expr $ packageDbPath stage
ghcPath <- expr $ programPath (vanillaContext (pred stage) ghc)
dbPath <- expr $ (</>) <$> topDirectory <*> packageDbPath stage
ghcPath <- expr $ (</>) <$> topDirectory
<*> programPath (vanillaContext (pred stage) ghc)
return $ unwords $ map show $ [ ghcPath ]
++ [ "-package-db " ++ dbPath | stage == Stage1 ]
++ [ "$@" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment