Boost logo

Boost Users :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-09-16 22:58:49


Martin Sarrazac wrote:
> Hi,
> compiler: mingw gcc 3.4.4
> I would like to compile boost.signals without exception handling, I
> read somewhere about the <exception-handling> feature so I tried:
>
> bjam --builddir=c:\temp -sTOOLS=mingw "-sBUILD=debug
> <exception-handling>off <runtime-link>dynamic <threading>single"
> --libdir=C:\boost\lib\noe --with-signals -d2 install
>
> without success, it compiles fine but not without exception handling.
> specifically the -fno-exception command line option should be passed to
> gcc and it's not.
>
> I had a look at tools/build/v1/gcc-tools.jam and I found this line for
> rtti support for instance:
>
> flags gcc C++FLAGS <rtti>off : -fno-rtti ;
>
> However there is nothing equivalent for exceptions...

Good job on the investigation :-) Very few users bother to go this far.
Yes even though "<exception-handling>" is defined there is no handling
for it in the GCC toolset. It's easy enough to add that you could easily
do it, as it's basically the same as the <rtti> flag you found.

But it is also possible to specify any additional compile flags with the
  -sBUILD setting. One just needs to use the <cxxflags> feature.

> On a side note I don't know how to give a new tag to the 'no exception'
> version of the library, so I compiled it in an other directory
> (--libdir=C:\boost\lib\noe). However I would much prefer to give it a
> specific name.

Now that's a tough one. There's no non-intrusive way to change the tags.
You would need to modify the Boost.Build code some. The place to do it
at would be in the "tools/build/v1/boost-base.jam" file. In there
there's a "rule common-variant-tag ..." which you would need to change
to add another letter to the tags when a build with
<exception-handling>off shows up.

> Is there somewhere information about all the -sBUILD
> flags can be found? Can't seem to locate it.

The only complete docs on that are on the source itself:
http://www.boost.org/tools/build/v1/features.jam - Don't worry if you
got far enough to somewhat parse the gcc-tools.jam file that one should
be a cake walk.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net