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

Ralph Versteegen teeemcee at gmail.com
Tue Feb 20 06:43:20 PST 2018


Actually, I wanted to talk about that. I think we should delay Fufluns a
bit. Nightlies are still in a state in which I'm actively advising people
not to use them, and I received report of, or discovered myself, at least 8
bugs just yesterday!  And I still have several feature branches to merge.

On 21 February 2018 at 03:18, James Paige <Bob at hamsterrepublic.com> wrote:

> Broken builds, and today is the day to start Fufluns stabilization. That
> seems about right ;)
>
>
> On Tuesday, February 20, 2018, Ralph Versteegen <teeemcee at gmail.com>
> wrote:
>
>> It doesn't entirely work on Windows either :(
>> After these changes, the size of custom.exe in the nightly builds only
>> reduced from 4.9MB to 4.4MB (mingw, gcc 5.3). But on my machine I get 3.2MB
>> (with mxe/mingw-w64, gcc 5.4) or 3.3MB (with mingw on windows, gcc 4.8.1).
>> gcc on the nightly build machine simply isn't stripping out the dead code
>> it should be - there's still an extra half a megabyte of libstdc++ in there
>> (most of it seems to be code for locale-dependent punctuation, especially
>> of currency!) Not counting all the symbols for that dead code. That still
>> doesn't add up to the whole discrepancy, though.
>>
>> Can't ssh to my mac right now, but I'll fix it blind. And I see I broke
>> android too. That's three different platform builds broken (including
>> Windows yesterday), in different ways!
>>
>> On 21 February 2018 at 02:00, James Paige <Bob at hamsterrepublic.com>
>> wrote:
>>
>>> 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
>>>>
>>>
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>>
>>
> _______________________________________________
> 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/20180221/6bb374a1/attachment.html>


More information about the Ohrrpgce mailing list