Magnus pushed to branch wip/mangoiv/hadrian-uncompressed-tar at Glasgow Haskell Compiler / GHC Commits: e189126d by mangoiv at 2026-07-15T15:09:36+02:00 hadrian: allow building binary dist tar without compression - - - - - 1 changed file: - hadrian/src/Rules/BinaryDist.hs Changes: ===================================== hadrian/src/Rules/BinaryDist.hs ===================================== @@ -365,16 +365,17 @@ bindistRules = do -- Finally, we create the archive <root>/bindist/ghc-X.Y.Z-platform.tar.xz tarPath <- builderPath (Tar Create) - cmd [Cwd $ root -/- bindist_folder] tarPath - [ "-c", compressorTarFlag compressor, "-f" - , ghcVersionPretty <.> "tar" <.> compressorExtension compressor - , ghcVersionPretty ] + cmd [Cwd $ root -/- bindist_folder] tarPath $ + [ "-c" + , "-f" , compressorExtension compressor $ ghcVersionPretty <.> "tar" + , ghcVersionPretty ] <> compressorTarFlag compressor forM_ [("binary", buildBinDist), ("reloc-binary", buildBinDistReloc)] $ \(name, mk_bindist) -> do phony (name <> "-dist") $ mk_bindist Xz phony (name <> "-dist-gzip") $ mk_bindist Gzip phony (name <> "-dist-bzip2") $ mk_bindist Bzip2 phony (name <> "-dist-xz") $ mk_bindist Xz + phony (name <> "-dist-uncompressed") $ mk_bindist NoCompressor phony "binary-dist-cross" $ buildBinDistX "binary-dist-dir-cross" "bindist" Xz phony "binary-dist-stage3" $ buildBinDistX "binary-dist-dir-stage3" "bindist" Xz @@ -430,7 +431,7 @@ bindistRules = do fixup f | f `elem` ["INSTALL", "README"] = "distrib" -/- f | otherwise = f -data Compressor = Gzip | Bzip2 | Xz +data Compressor = Gzip | Bzip2 | Xz | NoCompressor deriving (Eq, Ord, Show) @@ -448,16 +449,18 @@ generateBuildMk BindistConfig{..} = do a =. b = a ++ " = " ++ b -- | Flag to pass to tar to use the given 'Compressor'. -compressorTarFlag :: Compressor -> String -compressorTarFlag Gzip = "--gzip" -compressorTarFlag Xz = "--xz" -compressorTarFlag Bzip2 = "--bzip" +compressorTarFlag :: Compressor -> [String] +compressorTarFlag Gzip = ["--gzip"] +compressorTarFlag Xz = ["--xz" ] +compressorTarFlag Bzip2 = ["--bzip"] +compressorTarFlag NoCompressor = [] -- | File extension to use for archives compressed with the given 'Compressor'. -compressorExtension :: Compressor -> String -compressorExtension Gzip = "gz" -compressorExtension Xz = "xz" -compressorExtension Bzip2 = "bz2" +compressorExtension :: Compressor -> String -> String +compressorExtension Gzip p = p <.> "gz" +compressorExtension Xz p = p <.> "xz" +compressorExtension Bzip2 p = p <.> "bz2" +compressorExtension NoCompressor p = p -- | A list of files that allow us to support a simple -- @./configure [...] && make install@ workflow. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e189126dd7e849947adf38144d3e25dd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e189126dd7e849947adf38144d3e25dd... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Magnus (@MangoIV)