summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Program.hs
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-02-28 15:20:14 +0100
committerBen Gamari <ben@well-typed.com>2019-03-04 10:18:41 -0500
commit22c2713bcc30cea9da7d8b95f3ea99357d1551f7 (patch)
treea94938d22842886530265ddf6f8a7c49261cb954 /hadrian/src/Rules/Program.hs
parente2ae52c34e81123dce9991fad393d96fd7b7af6a (diff)
downloadhaskell-22c2713bcc30cea9da7d8b95f3ea99357d1551f7.tar.gz
Hadrian: track mingw, ship it in bindists, more robust install script
Diffstat (limited to 'hadrian/src/Rules/Program.hs')
-rw-r--r--hadrian/src/Rules/Program.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs
index 51bc2e9959..86ac88f1bb 100644
--- a/hadrian/src/Rules/Program.hs
+++ b/hadrian/src/Rules/Program.hs
@@ -8,6 +8,7 @@ import Context
import Expression hiding (stage, way)
import Oracles.Flag
import Oracles.ModuleFiles
+import Oracles.Setting (topDirectory)
import Packages
import Settings
import Settings.Default
@@ -18,6 +19,18 @@ import Utilities
buildProgramRules :: [(Resource, Int)] -> Rules ()
buildProgramRules rs = do
root <- buildRootRules
+
+ -- Proxy rule for the whole mingw toolchain on Windows.
+ -- We 'need' configure because that's when the inplace/mingw
+ -- folder gets filled with the toolchain. This "proxy" rule
+ -- is listed as a runtime dependency for stage >= 1 GHCs.
+ root -/- mingwStamp %> \stampPath -> do
+ top <- topDirectory
+ need [ top -/- "configure" ]
+ copyDirectory (top -/- "inplace" -/- "mingw") root
+ writeFile' stampPath "OK"
+
+ -- Rules for programs that are actually built by hadrian.
forM_ [Stage0 ..] $ \stage ->
[ root -/- stageString stage -/- "bin" -/- "*"
, root -/- stageString stage -/- "lib/bin" -/- "*" ] |%> \bin -> do