Page 1 of 1

libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 8:33 am
by Czarek
Release configuration - in branch 2785 it was only 121 MB, but now in branch 2840 it is almost 500 MB in size. Building on Ubuntu 14.04 and using config from AutomatedBuildSetup wiki page:

Code: Select all
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1"


Should I decrease "symbol_level" to 0?

Spotify binaries increased by 60 MB in branch 2840 (from 220 MB to 280 MB). In my case I'm using .tar.gz format and files increased from 50 MB to 150 MB, so that's a big difference.

Found this through Google:
Code: Select all
The GN equivalent to "fastbuild" is "symbol_level", though the values are inverted:

fastbuild=0 == symbol_level=2 (full symbols)
fastbuild=1 == symbol_level=1 (minimal symbols)
fastbuild=2 == symbol_level=0 (no symbols)


Does it mean there would be absolutely no symbols when symbol_level is decreased to 0? Was that the default in branch 2785 when using GYP configuration?

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 9:09 am
by fddima
Unrelated: do you strip symbols from .so for distribution?

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 9:27 am
by Czarek
No, I don't modify CEF binaries. When building the cefpython .so module I use '-flto' optimize flag during compiling and linking.

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 9:31 am
by fddima
Czarek wrote:No, I don't modify CEF binaries. When building the cefpython .so module I use '-flto' optimize flag during compiling and linking.

Well, but you know, that on *nix(?) symbols embedded into binaries? And they can be stripped from binary with "strip" command. This can be useful regardless to described question in this topic (and if you doesn't want distribute symbols).

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 9:33 am
by Czarek
I am distributing cefpython library, so having basic symbols embedded is useful so that you can debug using gdb and get a meaningful stack trace.

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 10:15 am
by magreenblatt
Using symbol_level=1 is your best option currently if you want any symbol information. Otherwise, you can strip the binaries or use symbol_level=0.

Re: libcef.so is huge 500 MB in branch 2840

PostPosted: Tue Oct 18, 2016 2:27 pm
by Czarek
Thank you both for the answers. I might use `strip` for some of the distribution packages, it reduces size to 100 MB.