Cabal compiling with profiling
Simon Marlow
simonmar at microsoft.com
Tue Apr 19 06:55:13 EDT 2005
On 19 April 2005 11:33, Malcolm Wallace wrote:
>>> I have a patch from Arthur Baars to build profiling libraries for
>>> GHC. I'm wondering how people think it should be integrated?
>>> Should we have a --prof option that JUST builds profiling
>>> libraries, or which builds both non profiling and profiling?
>>
>> --with-prof sounds good, which would build (and install etc.) the
>> prof way in addition to the normal way.
>
> I agree.
>
>> In the future we might need more of these (eg. --with-smp), but since
>> each one needs a different flag to GHC I don't think there's anything
>> more general we can reasonably do.
>
> I can envisage --with-tracing too, to build a Hat-enabled version
> of a package, which involves not only extra compiler flags but extra
> pre-processor and library dependencies too.
>
> In general, do you think these flags should combine in a linear
> fashion (one of each 'way') or cross-product (all possible
> permutations)?
In GHC some combinations make sense, and others don't (eg. "unreg"
doesn't mix with "smp", but "unreg" works with "prof"). A reasonable
approach would be to build all combinations that make sense. (I'm just
using "unreg" as an example, I don't think we need --with-unreg).
Cheers,
Simon
More information about the Libraries
mailing list