[Git][ghc/ghc][master] build system: Clean mingw tarballs

Marge Bot gitlab at gitlab.haskell.org
Tue Oct 27 18:02:07 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
f3d8ab2e by Ben Gamari at 2020-10-27T14:02:00-04:00
build system: Clean mingw tarballs

Tamar noticed in !4293 that the build systems fail to clean up the mingw
tarballs directory (`ghc-tarballs`). Fix this in both the make build
system and Hadrian.

- - - - -


2 changed files:

- ghc.mk
- hadrian/src/Rules/Clean.hs


Changes:

=====================================
ghc.mk
=====================================
@@ -1424,6 +1424,13 @@ distclean : clean
 # Don't delete 'inplace' itself, it contains source files.
 	$(call removeTrees,inplace/mingw)
 
+# Remove the download tarballs.  This is because updating
+# the tarballs doesn't remove old ones.  After a tarbal is updated
+# you end up with both in your tree and get a franken build.
+# The downside here is that a maintainer clean will trigger more
+# bandwidth usage from haskell.org
+	$(call removeTrees,ghc-tarballs)
+
 # Remove the fs utilities.
 	$(call removeFiles,utils/lndir/fs.h)
 	$(call removeFiles,utils/lndir/fs.c)


=====================================
hadrian/src/Rules/Clean.hs
=====================================
@@ -18,6 +18,11 @@ cleanSourceTree = do
     forM_ [Stage0 ..] $ removeDirectory . (path -/-) . stageString
     removeDirectory "sdistprep"
     cleanFsUtils
+    cleanMingwTarballs
+
+cleanMingwTarballs :: Action ()
+cleanMingwTarballs = do
+    liftIO $ IO.removeDirectoryRecursive "ghc-tarballs"
 
 -- Clean all temporary fs files copied by configure into the source folder
 cleanFsUtils :: Action ()



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f3d8ab2ef6ffe30ec91c795e0223392dd96ea61a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f3d8ab2ef6ffe30ec91c795e0223392dd96ea61a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201027/6c6ed4df/attachment.html>


More information about the ghc-commits mailing list