Re: how to make D program footprint smaller ?

2021-07-12 Thread dangbinghoo via Digitalmars-d-learn
On Saturday, 10 July 2021 at 21:40:54 UTC, Bastiaan Veelo wrote: On Friday, 9 July 2021 at 03:07:04 UTC, dangbinghoo wrote: as questioned in the previous thread, I need to find out something like `--as-needed` options available for D. You are probably looking for the

Re: how to make D program footprint smaller ?

2021-07-10 Thread Bastiaan Veelo via Digitalmars-d-learn
On Friday, 9 July 2021 at 03:07:04 UTC, dangbinghoo wrote: as questioned in the previous thread, I need to find out something like `--as-needed` options available for D. You are probably looking for the [-i](https://dlang.org/dmd-osx.html#switch-i%5B) compiler option. As far as I know `dub`

Re: how to make D program footprint smaller ?

2021-07-08 Thread dangbinghoo via Digitalmars-d-learn
On Friday, 9 July 2021 at 01:51:55 UTC, dangbinghoo wrote: On Thursday, 8 July 2021 at 11:18:26 UTC, russhy wrote: On Thursday, 8 July 2021 at 10:01:33 UTC, dangbinghoo wrote: I have tried to add ``` "dflags": ["--link-defaultlib-shared"], "lflags": ["--as-needed"], ``` to dub.json, and

Re: how to make D program footprint smaller ?

2021-07-08 Thread dangbinghoo via Digitalmars-d-learn
On Thursday, 8 July 2021 at 11:18:26 UTC, russhy wrote: On Thursday, 8 July 2021 at 10:01:33 UTC, dangbinghoo wrote: I have tried to add ``` "dflags": ["--link-defaultlib-shared"], "lflags": ["--as-needed"], ``` to dub.json, and my compiler is ldc2, with 800 loc program used `hibernated`

Re: how to make D program footprint smaller ?

2021-07-08 Thread russhy via Digitalmars-d-learn
On Thursday, 8 July 2021 at 10:01:33 UTC, dangbinghoo wrote: I have tried to add ``` "dflags": ["--link-defaultlib-shared"], "lflags": ["--as-needed"], ``` to dub.json, and my compiler is ldc2, with 800 loc program used `hibernated` and `asdf` package. it compiled to 27MB binary not

how to make D program footprint smaller ?

2021-07-08 Thread dangbinghoo via Digitalmars-d-learn
I have tried to add ``` "dflags": ["--link-defaultlib-shared"], "lflags": ["--as-needed"], ``` to dub.json, and my compiler is ldc2, with 800 loc program used `hibernated` and `asdf` package. it compiled to 27MB binary not stripped and even 4MB size after stripped. (When compiled to ARM,