Commit d3dde381 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

hadrian: Improve flag debug output

Previous the --flag arguments were not present in the debug output.
parent 02d1ce03
......@@ -140,17 +140,18 @@ configurePackage context@Context {..} = do
-- Compute the list of flags, and the Cabal configuration arguments
flavourArgs <- args <$> flavour
verbosity <- getVerbosity
flagList <- interpret (target context (Cabal Flags stage) [] []) flavourArgs
argList <- interpret (target context (Cabal Setup stage) [] []) flavourArgs
trackArgsHash (target context (Cabal Flags stage) [] [])
trackArgsHash (target context (Cabal Setup stage) [] [])
verbosity <- getVerbosity
when (verbosity >= Loud) $
putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configuration flags: " ++ unwords argList
let v = if verbosity >= Loud then "-v3" else "-v0"
argList' = argList ++ ["--flags=" ++ unwords flagList, v]
when (verbosity >= Loud) $ do
putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configure flags: " ++ unwords argList'
traced "cabal-configure" $
C.defaultMainWithHooksNoReadArgs hooks gpd
(argList ++ ["--flags=" ++ unwords flagList, v])
C.defaultMainWithHooksNoReadArgs hooks gpd argList'
dir <- Context.buildPath context
files <- liftIO $ getDirectoryFilesIO "." [ dir -/- "include" -/- "**"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment