Set default visibility of functions in BoringSSL to be hidden
Right now any build of the Dart VM (debug/release/product) compiles
against the same BoringSSL target. The VM build uses build-global
flags like `-fvisibility=hidden` which are set depending on the
global mode (e.g. product).
Though we want to be able to build a product AOT runtime in e.g.
--mode=release mode. The compiler-global flags will therefore be
from release build. This causes us to not set `-fvisibility=hidden`
and blows up the code size of the resulting binary.
This CL will cause only explicitly exported symbols to be visible,
which makes any VM that includes BoringSSL smaller. Which is very nice.
An alternative would be to parametrize the BoringSSL build rules and
export two targets, with/without -fvisibility=hidden.
=> Though it seems better to always have smaller binaries.
Reviewed-by: Zach Anderson <email@example.com>
Commit-Queue: Martin Kustermann <firstname.lastname@example.org>
1 file changed