Lame me, I found the answer here: http://haskell.org/ghc/docs/6.10.2/html/users_guide/template-haskell.html
ghc -fforce-recomp --make -cpp -O -DXQUERY2_TEST Main ghc -osuf p_o -prof -auto -auto-all -fforce-recomp --make -cpp -O -DXQUERY2_TEST Main Regards Christopher Skrzętnicki 2009/4/24 Krzysztof Skrzętnicki <[email protected]> > Hi > > I'm trying to build some modules that use TH with profiling enabled. > > The normal build works: > > $ ghc -fforce-recomp --make -cpp -O -DXQUERY2_TEST Main > [1 of 8] Compiling Text.XML.Expat.FormatCustom ( > Text/XML/Expat/FormatCustom.hs, Text/XML/Expat/FormatCustom.o ) > [2 of 8] Compiling DataStructures ( DataStructures.hs, DataStructures.o ) > Loading package ghc-prim ... linking ... done. > Loading package integer ... linking ... done. > Loading package base ... linking ... done. > Loading package syb ... linking ... done. > Loading package array-0.2.0.0 ... linking ... done. > Loading package packedstring-0.1.0.1 ... linking ... done. > Loading package containers-0.2.0.1 ... linking ... done. > Loading package pretty-1.0.1.0 ... linking ... done. > Loading package template-haskell ... linking ... done. > Loading package mtl-1.1.0.2 ... linking ... done. > Loading package filepath-1.1.0.2 ... linking ... done. > Loading package old-locale-1.0.0.1 ... linking ... done. > Loading package old-time-1.0.0.2 ... linking ... done. > Loading package unix-2.3.2.0 ... linking ... done. > Loading package directory-1.0.0.3 ... linking ... done. > Loading package process-1.0.1.1 ... linking ... done. > Loading package random-1.0.0.1 ... linking ... done. > Loading package derive-0.1.4 ... linking ... done. > [3 of 8] Compiling Utils ( Utils.hs, Utils.o ) > [4 of 8] Compiling Semantics.Pure ( Semantics/Pure.hs, Semantics/Pure.o ) > [5 of 8] Compiling Database ( Database.hs, Database.o ) > [6 of 8] Compiling XPathDSL ( XPathDSL.hs, XPathDSL.o ) > [7 of 8] Compiling QueryParse ( QueryParse.hs, QueryParse.o ) > [8 of 8] Compiling Main ( Main.hs, Main.o ) > Linking Main ... > > But profiling one fails: > > $ ghc -prof -auto -auto-all -fforce-recomp --make -cpp -O -DXQUERY2_TEST > Main > [1 of 8] Compiling Text.XML.Expat.FormatCustom ( > Text/XML/Expat/FormatCustom.hs, Text/XML/Expat/FormatCustom.o ) > [2 of 8] Compiling DataStructures ( DataStructures.hs, DataStructures.o ) > Loading package ghc-prim ... linking ... done. > Loading package integer ... linking ... done. > Loading package base ... linking ... done. > DataStructures.hs:1:0: > Dynamic linking required, but this is a non-standard build (eg. prof). > You need to build the program twice: once the normal way, and then > in the desired way using -osuf to set the object file suffix. > > The error message is somewhat cryptic to me. Does anyone know how to > perform profiling build when using TH? > > Regards > > Christopher Skrzętnicki >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
