Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam + purify
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2009-11-10 12:03:14


On Nov 9, 2009, at 10:33 PM, Vladimir Prus wrote:

> On Monday 09 November 2009 Anant Rao wrote:
>
>> Is there a way to build c++ code with bjam + purify on win, linux
>> or both?
>> If so, could you provide links to the info?
>> If not, is there any effort going on in that direction so I can
>> look forward to it one day?
>
> how is purify supposed to be used? The link I could find suggest
> that you just
> run purify on a normally-built binary, in which case things should
> work? If one
> should use "purify g++" to build binaries, instead, you can
> configure gcc as follows:
>
> using gcc : purify : "purify g++" ;
>
> in your user-config.jam, and then say:
>
> bjam toolset=gcc-purify
>
> Let me know if this helps,

Hi,

Here's a sampling of the changes we made to bring up Purify in
Boost.build. Basically we defined an instrument feature and defined
valgrind, purify, etc.. as valid instruments. Then we build with

bjam ... instrument=purify

Let me know if you want more details.

-- Noel

builtin.jam:# instrument built targets (usually instrument linked
executables)
builtin.jam:feature.feature instrument : none purify purecov quantify
valgrind cachegrind zerofault : propagated ;
builtin.jam:# diagnose and report error if instrument is an
incidental feature
builtin.jam:local tool = [ MATCH "^instrument=(.*)" : $(.argv) ] ;
builtin.jam: ECHO "Error: you can use more than one instrument if
you're not installing" ;
builtin.jam: ECHO " and found instrument=$(tool) which is
unsupported" ;
builtin.jam: ECHO " Remove the --installname option or use
only one instrument when installing" ;

cuda.jam:toolset.flags cuda.link CONFIG_COMMAND <instrument>purify/
<runtime-link>shared
cuda.jam:toolset.flags cuda.link OPTIONS <instrument>purify/<runtime-
link>shared
cuda.jam:toolset.flags cuda.link CONFIG_COMMAND <instrument>quantify/
<runtime-link>shared
cuda.jam:toolset.flags cuda.link OPTIONS <instrument>quantify/
<runtime-link>shared

gcc.jam:# get build directory for target instrument output
gcc.jam:toolset.flags gcc.link CONFIG_COMMAND <instrument>purify/
<runtime-link>shared
gcc.jam:toolset.flags gcc.link OPTIONS <instrument>purify/<runtime-
link>shared
gcc.jam:toolset.flags gcc.link CONFIG_COMMAND <instrument>purecov/
<runtime-link>shared
gcc.jam:toolset.flags gcc.link OPTIONS <instrument>purecov/<runtime-
link>shared
gcc.jam:toolset.flags gcc.link CONFIG_COMMAND <instrument>quantify/
<runtime-link>shared
gcc.jam:toolset.flags gcc.link OPTIONS <instrument>quantify/<runtime-
link>shared

sun.jam: flags sun.link OPTIONS <address-model>64/
<instrument>none : -m64 ;
sun.jam: flags sun.link OPTIONS <instrument>purify/<runtime-
link>shared/<address-model>64 : -m64 ;
sun.jam: flags sun.link OPTIONS <instrument>quantify/<runtime-
link>shared/<address-model>64 : -m64 ;
sun.jam: flags sun.link OPTIONS <instrument>purify/<runtime-
link>shared/<address-model>64 : -xarch=v9 ;
sun.jam: flags sun.link OPTIONS <instrument>quantify/<runtime-
link>shared/<address-model>64 : -xarch=v9 ;
sun.jam:# get build directory for target instrument output
sun.jam:flags sun.link CONFIG_COMMAND <instrument>purify/<runtime-
link>shared
sun.jam:flags sun.link CONFIG_COMMAND <instrument>quantify/<runtime-
link>shared


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk