Re: /usr/bin/ld.gold: error: failed to find object -lz

2019-08-07 Thread Dukc via Digitalmars-d-learn
Taking the LDC2 invocation and removing `-lz` and `-lresolv` seems to work around the problem. A bad long-term solution though.

Re: How to mark a condition is likeyly or unlikey ?

2019-08-07 Thread kinke via Digitalmars-d-learn
On Wednesday, 7 August 2019 at 11:37:06 UTC, lili wrote: How to do this in Dlang? Just as in C, this isn't standardized, and I don't think DMD has such a thing. For LDC, see https://forum.dlang.org/thread/ecycecfohgcqkfapi...@forum.dlang.org.

Re: /usr/bin/ld.gold: error: failed to find object -lz

2019-08-07 Thread Dukc via Digitalmars-d-learn
On Wednesday, 7 August 2019 at 02:47:11 UTC, ?boing? wrote: On Tuesday, 6 August 2019 at 12:39:08 UTC, Dukc wrote: On Tuesday, 6 August 2019 at 11:41:25 UTC, kinke wrote: LDC definitely doesn't add that. zlib shouldn't be necessary, as Phobos contains an (IIRC, outdated) version of it. Anyway

How to mark a condition is likeyly or unlikey ?

2019-08-07 Thread lili via Digitalmars-d-learn
Hi: In C there has likely unlikely marco used by condition expression。 #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) if (likely(var > 1)) do... How to do this in Dlang?

Re: /usr/bin/ld.gold: error: failed to find object -lz

2019-08-07 Thread Dukc via Digitalmars-d-learn
On Wednesday, 7 August 2019 at 02:47:11 UTC, ?boing? wrote: On Tuesday, 6 August 2019 at 12:39:08 UTC, Dukc wrote: On Tuesday, 6 August 2019 at 11:41:25 UTC, kinke wrote: LDC definitely doesn't add that. zlib shouldn't be necessary, as Phobos contains an (IIRC, outdated) version of it. Anyway