Use hidden visibility with GCC and Clang
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 30 Aug 2017 14:12:14 +0000 (15:12 +0100)
committerMika Isojärvi <misojarvi@google.com>
Mon, 25 Sep 2017 19:58:32 +0000 (12:58 -0700)
commit0fa7ebccc4159f4031ee7dde183b5714521b8b66
treecf1f9159323998bae290fdc670ff2c399906f84b
parent1e7c5746fb3d02262bf5f29b90bb4d2eb9d6ded4
Use hidden visibility with GCC and Clang

The final result of the build are standalone executables, with all the
code statically linked.

Change the visibility to hidden, to avoid the symbol leakage and allow
the compiler to discard some code.

As a result the binary size is drastically decreased.

Total executable size on my setup drops by ~20%
 158M    before
 128M    after

Note: The binaries still export multiple unneeded symbols. Resolving
those is left as an exercise for later.

Test: full rebuild, running resulting binaries.

Change-Id: Ife10bbd123d59f4480349794785f13978516df30
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
framework/delibs/cmake/CFlags.cmake