Re: Phobos still being statically linked in?

2015-10-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 18 October 2015 at 16:02:50 UTC, Jacob Carlborg wrote: On 2015-10-17 13:28, Marc Schütz wrote: Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet 1. It makes it easier to distribute binaries since most computers won't have a

Re: Phobos still being statically linked in?

2015-10-19 Thread Andrei Alexandrescu via Digitalmars-d
On 10/18/2015 01:37 PM, Marco Leise wrote: For the Gentoo Linux DMD package I made dynamic linking the default. It's not just Phobos but other libraries as well, like GtkD and what else you link into your executable. A simple GUI converting text in the clipboard on button press is at around 553

Re: Phobos still being statically linked in?

2015-10-19 Thread deadalnix via Digitalmars-d
On Monday, 19 October 2015 at 16:07:02 UTC, Andrei Alexandrescu wrote: On 10/18/2015 01:37 PM, Marco Leise wrote: For the Gentoo Linux DMD package I made dynamic linking the default. It's not just Phobos but other libraries as well, like GtkD and what else you link into your executable. A

Re: Phobos still being statically linked in?

2015-10-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-19 18:07, Andrei Alexandrescu wrote: How large is Hello, word when dynamically linked? -- Andrei When I did that back in the days with D1 and Tango it was 16KB. Same as a C Hello World. -- /Jacob Carlborg

Re: Phobos still being statically linked in?

2015-10-18 Thread Marco Leise via Digitalmars-d
For the Gentoo Linux DMD package I made dynamic linking the default. It's not just Phobos but other libraries as well, like GtkD and what else you link into your executable. A simple GUI converting text in the clipboard on button press is at around 553 KiB now. With static linking it is 6 MiB.

Re: Phobos still being statically linked in?

2015-10-18 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-17 13:28, Marc Schütz wrote: Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet 1. It makes it easier to distribute binaries since most computers won't have a Phobos and druntime installed 2. There's no guaranteed ABI

Re: Phobos still being statically linked in?

2015-10-17 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 17 October 2015 at 10:00:20 UTC, Shriramana Sharma wrote: Is this still true as it seems to be? If so, how do I tell dmd/ldc2 not to do that, but to use the available SO at: I'm not sure about ldc but the dmd option `-defaultlib=libphobos2.so` should do it. I think ldmd also

Phobos still being statically linked in?

2015-10-17 Thread Shriramana Sharma via Digitalmars-d
I went back to see my first post here in the D world two years ago: http://forum.dlang.org/post/mailman.413.1369930723.13711.digitalmars-d-le...@puremagic.com I had noted then with surprise that the most basic Hello World program took 300K+ with rdmd, but now it seems it's much more i.e. 600K+

Re: Phobos still being statically linked in?

2015-10-17 Thread Marc Schütz via Digitalmars-d
Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet, I just tried linking against libphobos.so and it worked. The resulting binary is then down to 13 Kb, after stripping. On the topic of executable size, Vladimir Panteleev did some work

Re: Phobos still being statically linked in?

2015-10-17 Thread Shriramana Sharma via Digitalmars-d
Marc Schütz wrote: > Yes, it's still linked statically by default, at least with DMD. > I don't know why this wasn't changed yet, I just tried linking > against libphobos.so and it worked. The resulting binary is then > down to 13 Kb, after stripping. Filed

Re: Phobos still being statically linked in?

2015-10-17 Thread Shriramana Sharma via Digitalmars-d
Marc Schütz wrote: > Yes, it's still linked statically by default, at least with DMD. > I don't know why this wasn't changed yet, I just tried linking > against libphobos.so and it worked. The resulting binary is then > down to 13 Kb, after stripping. Wow that's nice to hear! Can you outline the

Re: Phobos still being statically linked in?

2015-10-17 Thread Marc Schütz via Digitalmars-d
On Saturday, 17 October 2015 at 13:54:12 UTC, Shriramana Sharma wrote: Marc Schütz wrote: Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet, I just tried linking against libphobos.so and it worked. The resulting binary is then down to