Re: stripping binaries from LDC2

2022-02-07 Thread max haughton via Digitalmars-d-learn
On Monday, 7 February 2022 at 14:20:31 UTC, Arjan wrote: On Monday, 7 February 2022 at 13:14:19 UTC, max haughton wrote: On Monday, 7 February 2022 at 12:16:53 UTC, Arjan wrote: In c++ our release builds are build `-O2 -g` and the resulting binaries are stripped with GNU/strip. Is this also po

Re: stripping binaries from LDC2

2022-02-07 Thread Arjan via Digitalmars-d-learn
On Monday, 7 February 2022 at 13:14:19 UTC, max haughton wrote: On Monday, 7 February 2022 at 12:16:53 UTC, Arjan wrote: In c++ our release builds are build `-O2 -g` and the resulting binaries are stripped with GNU/strip. Is this also possible with LDC2 generated binaries for D code? So build D

Re: stripping binaries from LDC2

2022-02-07 Thread max haughton via Digitalmars-d-learn
On Monday, 7 February 2022 at 12:16:53 UTC, Arjan wrote: In c++ our release builds are build `-O2 -g` and the resulting binaries are stripped with GNU/strip. Is this also possible with LDC2 generated binaries for D code? So build D code with `-O2 -g` and then strip the resulting binary? Why b

stripping binaries from LDC2

2022-02-07 Thread Arjan via Digitalmars-d-learn
In c++ our release builds are build `-O2 -g` and the resulting binaries are stripped with GNU/strip. Is this also possible with LDC2 generated binaries for D code? So build D code with `-O2 -g` and then strip the resulting binary?

Re: ldc executable crashes with this code

2022-02-07 Thread bauss via Digitalmars-d-learn
On Saturday, 5 February 2022 at 03:02:37 UTC, forkit wrote: On Friday, 4 February 2022 at 15:58:19 UTC, Stanislav Blinov wrote: .. ... As others have already stated, casting immutability away is something that has to be supported, e.g. to interface with const-agnostic APIs. `@safe` requires s

Re: iteration over directories is unsafe

2022-02-07 Thread bauss via Digitalmars-d-learn
On Saturday, 5 February 2022 at 23:26:21 UTC, forkit wrote: It is not possible to do a simple iteration over directories in @safe mode. Really? I have to resort to unsafe?? // module test; @safe: // nope. no can do. import std; void main() { auto dFiles = dirEntries("", "*.{d,di}",