I was experimenting with `--gc-sections` effect on D code (with
great results) and have noticed that GDC binaries are much bigger
than DMD ones. I do understand that it is not a priority goal
right now but still curious, does anyone know what makes such
notable (~50%) difference?
(64-bit OS)
On 13/09/13 13:45, Dicebot wrote:
I was experimenting with `--gc-sections` effect on D code (with great results)
Can you expand on this? Never heard of it before and can't find it in gdc
--help or manpages.
On Friday, 13 September 2013 at 11:58:53 UTC, Joseph Rushton
Wakeling wrote:
On 13/09/13 13:45, Dicebot wrote:
I was experimenting with `--gc-sections` effect on D code
(with great results)
Can you expand on this? Never heard of it before and can't
find it in gdc --help or manpages.
`--gc-
Am Fri, 13 Sep 2013 13:45:58 +0200
schrieb "Dicebot" :
> I was experimenting with `--gc-sections` effect on D code (with
> great results) and have noticed that GDC binaries are much bigger
> than DMD ones. I do understand that it is not a priority goal
> right now but still curious, does anyone
On Friday, 13 September 2013 at 12:51:13 UTC, Johannes Pfau wrote:
It seems like the gdc compiled program has more symbols for some
reason:
--
nm hello-dmd --defined-only | wc -l
3834
nm hello-gdc --defined-only | wc -l
5451
--
Here's a "diff" of the defined symbols:
https://gis
On 13/09/13 14:02, Dicebot wrote:
`--gc-sections` is ld flag that enabled garbage collection of unreferenced
sections in resulting binary. For it to work gcc/gdc need to be run with
`-fdata-sections`and `-ffunction-sections` placing each symbol into own section.
That will, for example, remove tem
On 13/09/13 15:14, Joseph Rushton Wakeling wrote:
Related query -- is there any way of telling the compiler (gdc/gdmd or
preferably any of the D compilers) to strip out unused symbols/functions/data
from the binary?
I ask because I just tried compiling with the -fdata-sections and
-ffunction-s
On Friday, 13 September 2013 at 13:14:49 UTC, Joseph Rushton
Wakeling wrote:
Ahh, OK.
Related query -- is there any way of telling the compiler
(gdc/gdmd or preferably any of the D compilers) to strip out
unused symbols/functions/data from the binary?
I have a module that includes a quite la
On Friday, 13 September 2013 at 13:25:03 UTC, Dicebot wrote:
It is exactly what `gdc -fdata-sections -Xlinker --gc-sections
app.d` will do.
Be careful though, if you use dynamic loading of shared
libraries (or build your app as library) that may result in
weird stuff when applied to all sourc
On 13/09/13 15:25, Dicebot wrote:
On Friday, 13 September 2013 at 13:14:49 UTC, Joseph Rushton Wakeling wrote:
Related query -- is there any way of telling the compiler (gdc/gdmd or
preferably any of the D compilers) to strip out unused symbols/functions/data
from the binary?
I have a module th
On 13/09/13 15:36, Joseph Rushton Wakeling wrote:
Tried it. It reduces 12 MB executables to 11 MB -- but if I manually exclude
the module responsible for the big data, executable sizes fall to 2 MB.
Sorry, I'm talking nonsense. I managed to accidentally build using ldmd2, which
was responsib
On Friday, 13 September 2013 at 13:36:45 UTC, Joseph Rushton
Wakeling wrote:
Tried it. It reduces 12 MB executables to 11 MB -- but if I
manually exclude the module responsible for the big data,
executable sizes fall to 2 MB.
Then it is likely to be marked as referenced by something :( Can
y
On 13 September 2013 14:42, Joseph Rushton Wakeling
wrote:
> On 13/09/13 15:36, Joseph Rushton Wakeling wrote:
>>
>> Tried it. It reduces 12 MB executables to 11 MB -- but if I manually
>> exclude
>> the module responsible for the big data, executable sizes fall to 2 MB.
>
>
> Sorry, I'm talking
On 13 September 2013 16:24, Iain Buclaw wrote:
> On 13 September 2013 14:42, Joseph Rushton Wakeling
> wrote:
>> On 13/09/13 15:36, Joseph Rushton Wakeling wrote:
>>>
>>> Tried it. It reduces 12 MB executables to 11 MB -- but if I manually
>>> exclude
>>> the module responsible for the big data,
On 13/09/13 17:24, Iain Buclaw wrote:
I expect this is because the phobos/druntime libraries shipped with
dmd are (a) without debugging symbols and (b) stripped.
If you were to strip libphobos after installing gdc, then you would
see a significant drop in size.
Could be. I do build with the -
Am Fri, 13 Sep 2013 18:10:24 +0200
schrieb Joseph Rushton Wakeling :
> On 13/09/13 17:24, Iain Buclaw wrote:
> > I expect this is because the phobos/druntime libraries shipped with
> > dmd are (a) without debugging symbols and (b) stripped.
> >
> > If you were to strip libphobos after installing g
Am Fri, 13 Sep 2013 16:25:47 +0100
schrieb Iain Buclaw :
> On 13 September 2013 16:24, Iain Buclaw wrote:
>
> In this way, I'd also expect those who build gdc from source would
> have large executables than those who install gdc through a package
> manager/installer.
The example from the origin
On 13/09/13 18:30, Johannes Pfau wrote:
Use
make install-strip
instead of "make install"
Hmm, well, I just reinstalled GDC using make install-strip, rebuilt the programs
in question and they're still coming out as 12 MB ...
Could it be static vs. shared druntime/Phobos?
On Sep 13, 2013 5:41 PM, "Joseph Rushton Wakeling" <
joseph.wakel...@webdrake.net> wrote:
>
> On 13/09/13 18:30, Johannes Pfau wrote:
>>
>> Use
>> make install-strip
>> instead of "make install"
>
>
> Hmm, well, I just reinstalled GDC using make install-strip, rebuilt the
programs in question and t
On 13/09/13 19:22, Iain Buclaw wrote:
Can you check if it in fact strips binaries? (you can check with 'file')
bin/gdc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.24, stripped
lib64/libgphobos2.a: current ar archiv
On 13 September 2013 18:28, Joseph Rushton Wakeling
wrote:
> On 13/09/13 19:22, Iain Buclaw wrote:
>>
>> Can you check if it in fact strips binaries? (you can check with 'file')
>
>
> bin/gdc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
> dynamically linked (uses shared libs),
On 13/09/13 20:09, Iain Buclaw wrote:
du -h lib64/libgphobos2.a
73Mlib64/libgphobos2.a
strip --strip-unneeded lib64/libgphobos2.a
du -h lib64/libgphobos2.a
18Mlib64/libgphobos2.a
Ahh, OK.
Is there any way in which to ensure that the build splits Phobos up into library
and debugging
22 matches
Mail list logo