Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-08-29 02:58:46


On Monday 28 August 2006 12:24, Artem Alimarine wrote:
> Hi,
>
> Is there a way to tell the boost build system to generate assembler
> output for a C++ file? I need it to inspect the generated code for a
> couple of modules. It is essential that the asselbler output is
> generated with the same flags as used for generation of object files.
>
> I use GCC and MSVC toolsets. Tried the follwing:
> exe foo : foo.cpp
>
> : <toolset>msvc:<cxxflags>-Fafoo.asm
>
> <toolset>gcc:<cxxflags>-S
> ;
>
> The MSVC version works, although it dumps the file in the project root
> directory.
>
> The GCC does not work because -S prevents creations of the object file.
> Instead it creates the asm file with the name foo.o.
>
> Please let me know if there is a solution for this problem.

You can run "bjam -n" and then copy-paste the command line and add the needed
option.

>
> It would be nice to have a portable flag <asm-output>on or a special
> target type
> asm foo.asm : foo.cpp ;

This is probably beyond the portable nature of Boost.Build, if you need
assembler output you are likely to know the right switches already ;-)

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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