How to build SPIR-V supported LDC?

Nicholas Wilson iamthewilsonator at hotmail.com
Mon Apr 23 23:54:51 UTC 2018


On Monday, 23 April 2018 at 16:03:13 UTC, Sobaya wrote:
> I'd like to try dcompute.(https://github.com/libmir/dcompute)
>
> This requires SPIR-V supported LLVM and LDC built with it.
>
> But I don't understand how to build LDC with SPIR-V support.
>
> Please tell me the way.
>
> Thanks, Sobaya

If you want SPIR-V support you'll need to check out my fork of 
llvm (https://github.com/thewilsonator/llvm) and its git 
submodules. Then build LLVM (this takes a while, I'd recommend 
only building the arch you use (e.g. X86) + SPIR-V and optionally 
NVPTX). Then build LDC against that LLVM. There's a chance it 
might not build against LDC, I apologise if that happens I've 
been very busy and haven't been able to keep on top of changes.

Hopefully this will become much simpler once there is an official 
SPIR-V backend (hopefully June at the earliest).

I provide prebuilts for OS X, and I can do them for Windows and 
Linux but don't have them on hand. I might be able to build them 
before I leave for DConf, but don't bet on it, after that sure.


More information about the digitalmars-d-ldc mailing list