elvm
elvm copied to clipboard
Building with LLVM=1
How to do this?
I don't remember the exact step, but here's the branches:
https://github.com/shinh/elvm/tree/llvm https://github.com/shinh/llvm/tree/elvm https://github.com/shinh/clang/tree/elvm
It seems my copies of them were set up like:
elvm/llvm: the elvm branch of llvm elvm/llvm/tools/clang: the elvm branch of clang elvm/llvm-build: the build directory of llvm
To build the LLVM&clang for the ELVM target, you may perhaps need to set -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=ELVM to cmake
If clang and llc is built, I think https://github.com/shinh/elvm/blob/bb1c1a1bcc2359f797bf600abdf3ee2fa34af4c6/Makefile#L238 and llc -march=elvm -asm-verbose should be able to produce eir.
Ok, I built llvm, but the output has weird call instructions that are (understandably) not parsed correctly.
But they are parsed in the llvm branch, except that i don't have a clang built along with my LLVM so i need to use my system one (which is clang 9) but the LLVM in your fork is LLVM 4, so there are syntax errors on dso_local, which i can just replace out and it builds.
why is is so confusing? call intructions aren't used in the normal thing, and for some backends, they don't even work. Fortunatly, for my use case, the only one i care about is the JS backend.
call and ret are just lowered? That is really confusing.
I may not have had backends enabled too.