Skip to content
Browse files

When dynamic-by-default, build the dynamic library first

This is particularly important when TH is being used, as we need the
dynamic library built before the other ways try to do TH.
  • Loading branch information...
1 parent 4dff0e4 commit 26cbe6b176c4a53c60c1f99e8a257142d085c5d4 @igfoo igfoo committed Oct 12, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 Cabal/Distribution/Simple/GHC.hs
View
8 Cabal/Distribution/Simple/GHC.hs
@@ -667,9 +667,11 @@ buildLib verbosity pkg_descr lbi lib clbi = do
}
unless (null (libModules lib)) $
- do ifVanillaLib forceVanillaLib (runGhcProg vanillaOpts)
- ifProfLib (runGhcProg profOpts)
- ifSharedLib forceSharedLib (runGhcProg sharedOpts)
+ do let vanilla = ifVanillaLib forceVanillaLib (runGhcProg vanillaOpts)
+ shared = ifSharedLib forceSharedLib (runGhcProg sharedOpts)
+ if dynamicByDefault then do shared; vanilla
+ else do vanilla; shared
+ ifProfLib (runGhcProg profOpts)
-- build any C sources
unless (null (cSources libBi)) $ do

0 comments on commit 26cbe6b

Please sign in to comment.
Something went wrong with that request. Please try again.