[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL] hadrian: include haddock theme files in cross-compiler bindist lib dir
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC Commits: 3da57cb4 by Sven Tennie at 2026-06-12T13:01:38+00:00 hadrian: include haddock theme files in cross-compiler bindist lib dir The haddock builder is hardcoded to Stage1 (Builder.hs), so haddock HTML/latex theme files are only populated in _build/stage1/lib/html/. Cross-compiler bindists use library_stage = Stage2, so their lib dir (_build/stage2/lib/) never gets these files, and the installed cross-compiler's haddock fails with: haddock: internal error: .../lib/html: does not exist Fix: need the haddock resource files for library_stage before copying the lib dir into the bindist. The copy rules in Generate.hs already map _build/stageN/lib/html/** from utils/haddock/haddock-api/resources for all stages; they just need to be triggered. - - - - - 1 changed file: - hadrian/src/Rules/BinaryDist.hs Changes: ===================================== hadrian/src/Rules/BinaryDist.hs ===================================== @@ -214,6 +214,12 @@ buildBinDistDir root conf@BindistConfig{..} = do IO.removeFile versioned_runhaskell_path <|> return () IO.createFileLink version_prog versioned_runhaskell_path + -- The haddock builder hardcodes Stage1 for its resource files (Builder.hs), + -- so for cross bindists (library_stage /= Stage1) the html/latex theme dirs + -- are not populated in the library_stage lib dir. + when (library_stage /= Stage1) $ + need =<< haddockDeps library_stage + copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir -- Regenerate settings file without LibDir. For bindists, LibDir should View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3da57cb4c840e1027de1bb9b3edd4af1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3da57cb4c840e1027de1bb9b3edd4af1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)