libmir / dcompute

DCompute: Native execution of D on GPUs and other Accelerators
Boost Software License 1.0
138 stars 27 forks source link

Fail to build llvm-spirv #46

Closed bioinfornatics closed 6 years ago

bioinfornatics commented 6 years ago

Dear,

After to build the llvm lib from https://github.com/thewilsonator/llvm . I tried to build ldc2

with v1.9-beta1

/ldc2-1.9/tools/ldc-profdata/llvm-profdata-5.0.cpp:175:6: error: no matching function for call to 'llvm::InstrProfWriter::addRecord(std::remove_reference<llvm::InstrProfRecord&>::type, const uint64_t&, loadInput(const WeightedFile&, WriterContext*)::<lambda(llvm::Error)>)'

And we can see that the signature is not the same:

$ grep addRecord /usr/local/include/llvm/ProfileData/InstrProfWriter.h
  Error addRecord(InstrProfRecord &&I, uint64_t Weight = 1);

with ldc2 1.8.0

/ldc2-1.8/runtime/jit-rt/cpp-so/disassembler.cpp:297:32: error: 'const class llvm::object::SectionRef' has no member named 'getIndex'

And we can see that the signature do not exists into the modifief LLVM:

$ grep -R getIndex /usr/local/include/llvm/Object/ObjectFile.h
$

I would like to know how to build ldc2 with LLVM SPIR-V enabled in order to use dcompute ?

Thanks

Best regards

thewilsonator commented 6 years ago

Sorry for leaving this for so long. See https://github.com/libmir/dcompute/issues/50#issuecomment-419342233

bioinfornatics commented 6 years ago

thanks

happy to see you back on the project

thewilsonator commented 5 years ago

I'm moving to using https://github.com/KhronosGroup/SPIRV-LLVM-Translator instead of a custom LLVM, see https://github.com/ldc-developers/ldc/pull/2935

thewilsonator commented 5 years ago

Fixed.

bioinfornatics commented 5 years ago

thanks