summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-03-09 11:37:18 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-17 19:05:50 -0400
commit84927818ee68c6826327abc26d4647fb56053fb7 (patch)
tree108ab49003f77c80a1b2eeb755df44ecad416f22 /hadrian
parent540fa6b2cff3802877ff56a47ab3611e33a9ac86 (diff)
downloadhaskell-84927818ee68c6826327abc26d4647fb56053fb7.tar.gz
llvmGen: Accept range of LLVM versions
Previously we would support only one LLVM major version. Here we generalize this to accept a range, taking this range to be LLVM 10 to 11, as 11 is necessary for Apple M1 support. We also accept 12, as that is what apple ships with BigSur on the M1.
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Rules/BinaryDist.hs3
-rw-r--r--hadrian/src/Rules/SourceDist.hs3
2 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 8709de6b26..a527664b23 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -203,11 +203,14 @@ bindistRules = do
root -/- "bindist" -/- "ghc-*" -/- "configure" %> \configurePath -> do
ghcRoot <- topDirectory
copyFile (ghcRoot -/- "aclocal.m4") (ghcRoot -/- "distrib" -/- "aclocal.m4")
+ copyDirectory (ghcRoot -/- "m4") (ghcRoot -/- "distrib")
buildWithCmdOptions [] $
target (vanillaContext Stage1 ghc) (Autoreconf $ ghcRoot -/- "distrib") [] []
-- We clean after ourselves, moving the configure script we generated in
-- our bindist dir
removeFile (ghcRoot -/- "distrib" -/- "aclocal.m4")
+ removeDirectory (ghcRoot -/- "distrib" -/- "m4")
+
moveFile (ghcRoot -/- "distrib" -/- "configure") configurePath
-- Generate the Makefile that enables the "make install" part
diff --git a/hadrian/src/Rules/SourceDist.hs b/hadrian/src/Rules/SourceDist.hs
index 78c1539b3d..de35922ae1 100644
--- a/hadrian/src/Rules/SourceDist.hs
+++ b/hadrian/src/Rules/SourceDist.hs
@@ -113,7 +113,8 @@ prepareTree dest = do
, "mk"
, "rts"
, "rules"
- , "utils" ]
+ , "utils"
+ , "m4" ]
srcFiles =
[ "GIT_COMMIT_ID"
, "HACKING.md"