Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit 31efb47

Browse files
committed
Windows only: delay adding targetDir dependencies
* hptool/src/OS/Win.hs * Move the enumeration of the targetDir contents until after we are actually complete with this directory. This step needs to be timed differently than the other builds since on the Windows builds, HP and GHC are installed into a single directory. Without this, Shake will complain that the directory contents of targetDir have changed (upon populating targetDir with the HP-specific packages) since the time of making a dependency on them (which would happen after GHC is placed in targetDir).
1 parent f5bbba0 commit 31efb47

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

hptool/src/OS/Win.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ winOsFromConfig BuildConfig{..} = os
9696
whenM :: (Monad m) => m Bool -> m () -> m ()
9797
whenM mp m = mp >>= \p -> when p m
9898

99-
osTargetAction = do
100-
-- Now, targetDir is actually ready to snapshot (we skipped doing
101-
-- this in osGhcTargetInstall).
102-
void $ getDirectoryFiles "" [targetDir ++ "//*"]
99+
osTargetAction = return ()
103100

104101
osGhcDbDir = winGhcPackageDbDir
105102

@@ -138,10 +135,15 @@ winOsFromConfig BuildConfig{..} = os
138135

139136
osProduct %> \_ -> do
140137
need $ [dir ghcLocalDir, phonyTargetDir, vdir ghcVirtualTarget]
141-
++ winNeeds
142138

143139
copyWinTargetExtras bc
144140

141+
-- Now, targetDir is actually ready to snapshot (we skipped doing
142+
-- this in osGhcTargetInstall).
143+
void $ getDirectoryFiles "" [targetDir ++ "//*"]
144+
145+
need winNeeds
146+
145147
-- Now, it is time to make sure there are no problems with the
146148
-- conf files copied to
147149
localCommand' [] "ghc-pkg"

0 commit comments

Comments
 (0)