diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2018-09-21 22:24:41 +0200 |
---|---|---|
committer | Andrey Mokhov <andrey.mokhov@gmail.com> | 2018-09-21 22:24:41 +0200 |
commit | 835f2766eda708c7f8bc21c25528ce60dc7e8319 (patch) | |
tree | 54c99b5b475f8e3d0949c512b1e14497703f63eb | |
parent | 6eb9c0c9bf918586f3f5b1c350eb99d541e43e06 (diff) | |
download | haskell-835f2766eda708c7f8bc21c25528ce60dc7e8319.tar.gz |
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
-rw-r--r-- | src/Rules/Program.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs index 9c0f4593f2..76390e3caa 100644 --- a/src/Rules/Program.hs +++ b/src/Rules/Program.hs @@ -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 () |