Martin Kinkelin

Results 443 comments of Martin Kinkelin

> I wonder if there is an easier way to do this. (maybe a ldc2 setup wasm32-wasi?) See https://github.com/adamdruppe/d_android/blob/master/android-setup.d. It's currently limited to Android, but could/should be generalized (for all...

> --build-mode=allAtOnce is required otherwise I get undefined symbol: _Dmodule_ref The compiler could be adapted to use a different method of bundling the ModuleInfo pointers of linked modules for druntime...

Looks like LLD supports the magic __start/stop linker symbols for wasm too: https://github.com/llvm/llvm-project/blob/e6d9b2cb92dd8ad544f43dc97e82fa98e07e977c/lld/test/wasm/startstop.ll#L11-L12

> I will contact adam about this and generalize it to work for all prebuild packages. Awesome, thx. The tool was sketched out in https://forum.dlang.org/post/[email protected].

LLVM 10 introduced TLS support for wasm: https://releases.llvm.org/10.0.0/docs/ReleaseNotes.html#changes-to-the-webassembly-target Should we undo the no-TLS hack accordingly?

If this works, the shared libs support for macOS should be upstreamable without requiring DMD compiler changes. FYI @jacob-carlborg.

A PITA without being able to test locally. Maybe the TLS block incl. `TLVDescriptor` are lazily allocated, so that it was with the previous `getTLSAnchor()` call but now isn't anymore...

> this change will not make dynamic libraries with DMD, right? Not alone; the according `rt.sections_elf_shared` modifications would need to be upstreamed of course, but that should be almost it....

The sanitizers are probably just a minor aspect of switching to the 'new' pass manager (https://llvm.org/docs/NewPassManager.html). We also need to port *our* passes (https://forum.dlang.org/thread/[email protected], https://llvm.org/docs/WritingAnLLVMNewPMPass.html) before we can use it.