diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index 0213362204f72fd637069763582df985ef6f164b..322828c307dda4e407591a75924fffb3732ea62d 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -150,7 +150,14 @@ bindistRules = do else createFileLink install_path unversioned_install_path copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir copyDirectory (rtsIncludeDir) bindistFilesDir + + -- Call ghc-pkg recache, after copying so the package.cache is + -- accurate, then it's on the distributor to use `cp -a` to install + -- a relocatable bindist. + cmd_ (bindistFilesDir -/- "bin" -/- "ghc-pkg") ["recache"] + need ["docs"] + -- TODO: we should only embed the docs that have been generated -- depending on the current settings (flavours' "ghcDocs" field and -- "--docs=.." command-line flag)