Skip to content

Fix -ddump-to-file and -ddump-timings interaction (#20316)

cydparser requested to merge cydparser/ghc:dump-timings-only-to-file into master

This change causes console output to be suppressed for timings when building with -ddump-to-file. E.g.

_build/stage1/bin/ghc -fforce-recomp -ddump-to-file -ddump-timings tmp/Main.hs
[1 of 2] Compiling Main             ( tmp/Main.hs, tmp/Main.o )
[2 of 2] Linking tmp/Main [Objects changed]

The output when building with GHC 9.6.2 is:

*** initializing unit database:
*** Chasing dependencies:
[1 of 2] Compiling Main             ( tmp/Main.hs, tmp/Main.o )
*** Parser [Main]:
*** Renamer/typechecker [Main]:
*** Desugar [Main]:
*** Simplifier [Main]:
*** CoreTidy [Main]:
*** CorePrep [Main]:
*** CoreToStg [Main]:
*** CodeGen [Main]:
*** WriteIface [tmp/Main.hi]:
*** systool:as:
[2 of 2] Linking tmp/Main
*** systool:cc:
*** systool:cc:
*** systool:linker:

Where is the key part of this patch? That is, what should reviewers look at first?

compiler/GHC/Utils/Error.hs

Please take a few moments to address the following points:

  • if your MR may break existing programs (e.g. touches base or causes the compiler to reject programs), please describe the expected breakage and add the user-facing label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage.
  • ensure that your commits are either individually buildable or squashed
  • ensure that your commit messages describe what they do (referring to tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places.
  • add update a [testcase to the testsuite][adding test].
  • updates the users guide if applicable
  • mentions new features in the release notes for the next release

Merge request reports