Open spyked opened 5 years ago
Hello! I'll try to reproduce it and I'll come back to you. Thanks for the issue !
Thank you for looking at this!
I forgot to add: the LLVM build I used is the official LLVM 6.0 release compiled with X86 as a target and with RTTI support.
I've been digging a bit more into this and the reason for the assertion failure seems to be related to the fact that registerPass
is called multiple times from the initialization routines in the run-time, e.g. LLVMInitializeX86Target
called from InitNativeTarget
. This can be observed by running the example under gdb and breaking on registerPass
.
The bug doesn't manifest in the LLVM packaged in e.g. Debian because that is a release build, or in any case, assertions are disabled for package builds. Passing -DCMAKE_BUILD_TYPE="Release"
to the LLVM cmake call works around the bug.
Today I've been trying to fix this. I did not find a solution for the moment. There seem to be other problems also with static linking for example. Thanks a lot for the help!
Compiling with a custom build of LLVM 6.0 works:
And so does compiling a very simple example:
But running it gives the following error:
hello.cpp
:Can I get some help regarding this? Thank you!