Building Boost without RTTI

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Boost without RTTI

Boost - Build mailing list
Hello,

I'm trying to build boost 1.66 libraries without RTTI on Windows 10
using MSVC compiler and b2.exe

Following this documentation:
http://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary 

I've successfully built boost using "b2 toolset=msvc
--build-type=complete stage" but RTTI are enabled by default from what I
understood and my project requier RTTI to be disabled.
However, I can't find any option to do this in b2.exe --help.

Thanks,
Lucas

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost without RTTI

Boost - Build mailing list
Hi,

I'm using "bjam" to build boost on Windows without RTTI but maybe this helps. I added following defines:

define=BOOST_NO_RTTI
define=BOOST_NO_TYPEID

And disabled RTTI usage for Visual Studio:

cxxflags=/GR-

But some boost libraries aren't compilable without RTTI but you will get corresponding error messages if you try to compile these libraries.


Regards
Marco

-----Ursprüngliche Nachricht-----
Von: Boost-build [mailto:[hidden email]] Im Auftrag von Lucas Le Gouic via Boost-build
Gesendet: Mittwoch, 21. März 2018 16:03
An: [hidden email]
Cc: Lucas Le Gouic <[hidden email]>
Betreff: [Boost-build] Building Boost without RTTI

Hello,

I'm trying to build boost 1.66 libraries without RTTI on Windows 10 using MSVC compiler and b2.exe

Following this documentation:
http://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary 

I've successfully built boost using "b2 toolset=msvc --build-type=complete stage" but RTTI are enabled by default from what I understood and my project requier RTTI to be disabled.
However, I can't find any option to do this in b2.exe --help.

Thanks,
Lucas

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost without RTTI

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
Hi Lucas,

> -----Original Message-----
> From: Boost-build <[hidden email]> On Behalf Of
> Lucas Le Gouic via Boost-build
> Sent: Mittwoch, 21. März 2018 16:03
> To: [hidden email]
> Cc: Lucas Le Gouic <[hidden email]>
> Subject: [Boost-build] Building Boost without RTTI
>
> I've successfully built boost using "b2 toolset=msvc
> --build-type=complete stage" but RTTI are enabled by default from what I
> understood and my project requier RTTI to be disabled.
> However, I can't find any option to do this in b2.exe --help.

most of Boost cannot be built without RTTI. However, most of it can be used without RTTI,
at least in release mode. I've never done this in debug mode.

So what I'm doing is building Boost with
b2.exe --with-... define="BOOST_NO_RTTI"
so that it behaves as if RTTI were disabled except if it's really needed. This doesn't really
feel clean, but it works for me.

Alternatively, you could pass cxxflags="/GR-", but some libraries will just crash then.

Marcel

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build