Fix performance bug: Stage0 packages do not depend on inplaceLibCopyTargets
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Thu, 14 Sep 2017 00:13:37 +0000 (01:13 +0100)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Thu, 14 Sep 2017 00:13:37 +0000 (01:13 +0100)
See #393

src/Settings/Builders/GhcCabal.hs

index fc39637..c555bf0 100644 (file)
@@ -6,15 +6,14 @@ import Hadrian.Haskell.Cabal
 
 import Context
 import Flavour
-import Settings.Builders.Common hiding (package)
+import Settings.Builders.Common
 
 ghcCabalBuilderArgs :: Args
 ghcCabalBuilderArgs = builder GhcCabal ? do
     verbosity <- expr getVerbosity
     top       <- expr topDirectory
-    context   <- getContext
     path      <- getBuildPath
-    when (package context /= deriveConstants) $ expr (need inplaceLibCopyTargets)
+    notStage0 ? expr (need inplaceLibCopyTargets)
     mconcat [ arg "configure"
             , arg =<< pkgPath <$> getPackage
             , arg $ top -/- path