Martin Kinkelin
Martin Kinkelin
It *looks* reasonable, but won't work for the types that the linked clang diff fixed - structs with multiple fields, as those are apparently passed as a pointer.
Which would need something like https://github.com/dlang/dmd/blob/d6602a6b0f658e8ec24005dc7f4bf51f037c2b18/druntime/src/core/stdc/stdarg.d#L202-L206 (with different condition of course)
Here's the logic I use for LDC: https://github.com/ldc-developers/ldc/blob/87ae83869341e309c5cb94a8e685eb2521870b76/gen/abi/wasm.cpp#L19-L58 E.g., passed directly: `struct S { int[1] arr; }`, `struct S2 { S s; }`, `S[1]` etc. Indirectly: `struct T { int[2]...
Thx, this looks quite okay now. There are some things which could be improved with this approach, such as NOT nesting the helper templates in the `va_arg(T)` template (so that...
Not directly related, but turns out we don't actually merge .a libs on Posix as I had assumed (AFAIK, this 'just works' on Windows - by specifying the .lib inputs...
@ibuclaw: Do you explicitly opt out of these null-deref optimizations for GDC? Apparently not just for `@safe` functions. I'm wondering if I should really only restrict it to `@safe` functions.
Oh I see, it's only clang that 'optimizes' the artificial tiny testcase, not gcc.
To add this to our LLVM CI build, which we use for the LDC CI builds, it should suffice to add an according `Xtensa` item to `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD`, in * https://github.com/ldc-developers/llvm-project/blob/935778f46f782492371ef43fc07bae4f6b6ff113/.github/workflows/ldc-release.yml#L95...
Thanks for doing this; LGTM after a superficial glance. Yeah some CI coverage would be great; CircleCI is just kept because it doesn't hurt/get in the way; Cirrus is unfortunately...
> I would suggest that instead of linking against -lz only for static builds, you link against -lz always (when the `-DPHOBOS_SYSTEM_ZLIB=TRUE` switch is passed). The cost is almost nothing...