Skip to content
Snippets Groups Projects
Commit 93df28f6 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Use computeEffectiveProfiling to determine defaults, cleans up flag display.


Before:
    In order, the following would be built (use -v for more details):
     - Cabal-2.1.0.0 (lib) --enable-library-profiling (first run)

After:
    In order, the following would be built (use -v for more details):
     - Cabal-2.1.0.0 (lib) (first run)

Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
parent 939d6c85
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,7 @@ import Distribution.Simple.LocalBuildInfo
( ComponentName(..), pkgComponents )
import qualified Distribution.Simple.Setup as Setup
import Distribution.Simple.Command (commandShowOptions)
import Distribution.Simple.Configure (computeEffectiveProfiling)
import Distribution.Simple.Utils
( die'
......@@ -750,12 +751,7 @@ printPlan verbosity
nubFlag :: Eq a => a -> Setup.Flag a -> Setup.Flag a
nubFlag x (Setup.Flag x') | x == x' = Setup.NoFlag
nubFlag _ f = f
-- TODO: Closely logic from 'configureProfiling'.
tryExeProfiling = Setup.fromFlagOrDefault False
(configProf fullConfigureFlags)
tryLibProfiling = Setup.fromFlagOrDefault False
(Mon.mappend (configProf fullConfigureFlags)
(configProfExe fullConfigureFlags))
(tryLibProfiling, tryExeProfiling) = computeEffectiveProfiling fullConfigureFlags
partialConfigureFlags
= Mon.mempty {
configProf =
......
......@@ -2,7 +2,7 @@
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- p-1.0 (lib) --enable-library-profiling (first run)
- p-1.0 (lib) (first run)
- q-1.0 (exe:q) --enable-profiling (first run)
Configuring library for p-1.0..
Preprocessing library for p-1.0..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment