PSA: WebRTC does not support component builds

181 views
Skip to first unread message

mbon...@webrtc.org

unread,
Mar 3, 2017, 6:08:29 PM3/3/17
to discuss-webrtc

With GN it is possible to generate ninja projects which support component builds [1].


With component builds it is possible to generate shared libraries instead of static libraries. This can be useful during development because it speeds up link times even if it slows down load time performance.


I'd just like to make it clear that WebRTC does not support component builds, so even if the GN argument ‘is_component_build’ is set to true, it will not generate shared libraries.


This was confusing for a lot of WebRTC users so from revision 2cb3944ba7e4467601ebd94888e1811a6d77be49 (#17020) now we are explicitly checking that ‘is_component_build’ is set to false (the default for WebRTC) and raise an error with a meaningful message if it's not.


Here is a brief technical explanation:


WebRTC uses ‘rtc_shared_library’ and ‘rtc_static_library’ to build libraries.

To support ‘is_component_build=true’ we have to change all these targets to use the target type ‘component’ which is doable but not prioritized in this moment. It is also discouraged by the GN design to have too many components.


[1] - https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md

Reply all
Reply to author
Forward
0 new messages