[Ohrrpgce] SVN: teeemcee/10025 scons: Reduce game/custom.exe size by 1MB by compiling with --gc-section

James Paige Bob at hamsterrepublic.com
Tue Feb 20 05:00:14 PST 2018


Looks like this doesn't work on Mac:


ld: unknown option: --gc-sections
clang: error: linker command failed with exit code 1 (use -v to see
invocation)


On Sunday, February 18, 2018, <subversion at hamsterrepublic.com> wrote:

> teeemcee
> 2018-02-18 23:58:20 -0800 (Sun, 18 Feb 2018)
> 452
> scons: Reduce game/custom.exe size by 1MB by compiling with --gc-sections
>
> Measured on a gengcc=1 debug=0 build with MXE (mingw-w64).
> Mainly, this cuts out most of libstdc++, which we statically link. So the
> effect
> isn't dramatic on other platforms.
>
> I now measure game.exe as 3MB and custom.exe as 3.5MB. Of that, 600KB is
> symbol information, unfortunately a large amount of that is from libstdc++,
> because ld doesn't delete symbols for GC'd sections.
> ---
> U   wip/SConscript
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180220/1de37df5/attachment.html>


More information about the Ohrrpgce mailing list