Building webrtc with rtti support by default

508 views
Skip to first unread message

Rama Palaniappan

unread,
Jun 21, 2018, 2:43:03 AM6/21/18
to discuss-webrtc
Hello webrtc community,

I was wondering what are the pros and cons of building webrtc with rtti enabled by using the gn arg `use_rtti=true` globally. Why is it turned off by default? Is it due to performance reasons? We have a bunch of other dependencies that are built with rtti support and we would prefer if we could build webrtc with rtti support as well. 

Best
Rama

mbon...@webrtc.org

unread,
Jun 21, 2018, 2:51:03 AM6/21/18
to discuss-webrtc
Hi, if you need to build with RTTI because other dependencies in your project require that, it is perfectly fine to use the GN argument use_rtti=true.

The main side effect is that you will notice a small size increase in the binary. WebRTC doesn't compile with RTTI by default because it follows the Chromium and the Google C++ style guide which asks to avoid RTTI (and the reasons why RTTI should be avoided are here: https://google.github.io/styleguide/cppguide.html#Run-Time_Type_Information__RTTI_). For more info about the WebRTC style guide please refer to: https://webrtc.googlesource.com/src/+/HEAD/style-guide.md.
Reply all
Reply to author
Forward
0 new messages