Commit 835f2766 authored by Alp Mestanogullari's avatar Alp Mestanogullari Committed by Andrey Mokhov
Browse files

Build touchy and unlit only in Stage0, copy binaries for later stages (#693)

* unlit: build only in stage0, copy that binary for later stages (fixes #595)

* add missing condition

We only want this "optimisation" for unlit.

* compare 'Package's instead of strings

* same optimisation for touchy
parent 6eb9c0c9
......@@ -55,6 +55,9 @@ buildProgram rs = do
(True, s) | s > Stage0 -> do
srcDir <- buildRoot <&> (-/- (stageString Stage0 -/- "bin"))
copyFile (srcDir -/- takeFileName bin) bin
(False, s) | s > Stage0 && (package `elem` [touchy, unlit]) -> do
srcDir <- stageLibPath Stage0 <&> (-/- "bin")
copyFile (srcDir -/- takeFileName bin) bin
_ -> buildBinary rs bin =<< programContext stage package
buildBinary :: [(Resource, Int)] -> FilePath -> Context -> Action ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment