[llvm-dev] Is my strategy about right?

Joachim Durchholz via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 14 23:19:04 PDT 2015

Hi all,

I'm setting up for a compiler project using LLVM as a backend, and I 
need some feedback about the easiest ecosystem for that.
I need to build compiler and run-time system. For now, a proof of 
concept that picks the low-hanging fruits of LLVM is fully adequate, I 
don't care too much whether that code has long-term value.

I'd like your thoughts about the avenues I'm seeing right now:

1) Since my C++ is ancient, rusty, and moldy, and since I'm pretty 
fluent in Java, do it in Java. (I find those linkage discussions scary - 
seems like the situation didn't get better in the past 15 years, just 
more complicated.)
Whether that's even viable depends a lot on how much of the LLVM API 
needs to be wrapped. Java used to suck badly at such wrappers; things 
have improved a lot since JNA became available, but of course it's still 
far from ideal.
I'm not opposed to getting up to speed with C++ again though. It would 
be a useful thing to have in my CV after all.

2) Use Clang for the compiler and runtime.
2a) Use precompiled binaries. (Are these even available?)
2b) Compile Clang using gcc.
2b1) Be extra paranoid, and use the Clang produced in (2b) to compile 
Clang again. (Is that worth the extra effort?)
2b2) Consider gcc-compiled Clang good enough if it runs the tests.
2b3) Don't worry about testing, simply assume going to be all okay on an 
amd64-linux platform anyway.

3) Use gcc for the compiler and runtime.
Um... not really. I want Clang's error messages, they are consistently 
being reported as vastly superior to those of gcc.

Any thoughts and feedback appreciated.


More information about the llvm-dev mailing list