Skip to content

Commit

Permalink
Check all object file suffixes for recompilation (#3128)
Browse files Browse the repository at this point in the history
Fixes #3128.

(cherry picked from commit 5efc634)
  • Loading branch information
lukexi authored and 23Skidoo committed Feb 13, 2016
1 parent 2a0ba31 commit 3569bc6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cabal/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,13 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
}
odir = fromFlag (ghcOptObjDir vanillaCcOpts)
createDirectoryIfMissingVerbose verbosity True odir
needsRecomp <- checkNeedsRecompilation filename vanillaCcOpts
when needsRecomp $ do
runGhcProg vanillaCcOpts
unless forRepl $
whenSharedLib forceSharedLib (runGhcProg sharedCcOpts)
unless forRepl $ whenProfLib (runGhcProg profCcOpts)
let runGhcProgIfNeeded ccOpts = do
needsRecomp <- checkNeedsRecompilation filename ccOpts
when needsRecomp $ runGhcProg ccOpts
runGhcProgIfNeeded vanillaCcOpts
unless forRepl $
whenSharedLib forceSharedLib (runGhcProgIfNeeded sharedCcOpts)
unless forRepl $ whenProfLib (runGhcProgIfNeeded profCcOpts)
| filename <- cSources libBi]

-- TODO: problem here is we need the .c files built first, so we can load them
Expand Down

0 comments on commit 3569bc6

Please sign in to comment.