Compiling to LLVM Bitcode
David Nadlinger
see at klickverbot.at
Tue May 14 20:30:14 PDT 2013
I'm in a hurry right now, sorry for the short reply:
On Monday, 8 April 2013 at 04:31:06 UTC, Dave G wrote:
> "llvm-link" can link the files "ldc2 -output-bc" generates, but
> I still need it to link to the standard library and runtime. I
> rebuilt LDC to generate the bitcode files for phobos and the
> runtime and then joined them all, but could not create a
> working executable from that.
What exactly have you tried, and how did it fail? If you just
used the .bc files generated by CMake, I think the issue might be
that the C parts of druntime/Phobos (e.g. zlib) are missing. This
is a known issue
(https://github.com/ldc-developers/ldc/issues/220), and should be
fairly easy to fix.
> The goal here is to generate something that emscripten can
> compile.
I'm not sure if you are on the right track here. druntime
contains a lot of stuff that is just not translatable to
JavaScript that easily (GC, threading, …).
David
More information about the digitalmars-d-ldc
mailing list