[commit: ghc] master: Build touchy and unlit only in Stage0, copy binaries for later stages (#693) (835f276)

git at git.haskell.org git at git.haskell.org
Tue Oct 23 20:20:41 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/835f2766eda708c7f8bc21c25528ce60dc7e8319/ghc

>---------------------------------------------------------------

commit 835f2766eda708c7f8bc21c25528ce60dc7e8319
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date:   Fri Sep 21 22:24:41 2018 +0200

    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


>---------------------------------------------------------------

835f2766eda708c7f8bc21c25528ce60dc7e8319
 src/Rules/Program.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index 9c0f459..76390e3 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 ()



More information about the ghc-commits mailing list