Commit 628c396f authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Make Backpack work with profiling.



I am not sure what I was thinking when I modified the
code to skip profiling builds if there was no code,
but this is surely wrong!  Comes with a test.

Fixes #4754.
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent d53b6e0d
......@@ -642,7 +642,7 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
else if isGhcDynamic
then do shared; vanilla
else do vanilla; shared
when has_code $ whenProfLib (runGhcProg profOpts)
whenProfLib (runGhcProg profOpts)
-- build any C sources
unless (not has_code || null (cSources libBi)) $ do
......
name: p
version: 0.1
cabal-version: >= 2.0
build-type: Simple
library
exposed-modules: P
signatures: Sig
build-depends: base
executable pexe
build-depends: p, base
mixins: base, base (Prelude as Sig)
main-is: PExe.hs
hs-source-dirs: pexe
# Setup configure
Resolving dependencies...
Configuring p-0.1...
Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
# Setup build
Preprocessing library for p-0.1..
Building library instantiated with Sig = <Sig>
for p-0.1..
Preprocessing library for p-0.1..
Building library instantiated with Sig = base-<VERSION>:Prelude
for p-0.1..
Preprocessing executable 'pexe' for p-0.1..
Building executable 'pexe' for p-0.1..
# Setup configure
Configuring p-0.1...
Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
# Setup build
Preprocessing library for p-0.1..
Building library instantiated with Sig = <Sig>
for p-0.1..
Preprocessing library for p-0.1..
Building library instantiated with Sig = base-<VERSION>:Prelude
for p-0.1..
Preprocessing executable 'pexe' for p-0.1..
Building executable 'pexe' for p-0.1..
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
skipUnless =<< hasProfiledLibraries
setup "configure" ["--enable-profiling"]
setup "build" []
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