LLVM Backend on GNU/Linux with GCC/GNAT¶
Hint
You need to install LLVM (usually depends on libedit
, see #29). The supported versions are 3.5 til 5.0, but debugging is only supported with LLVM 3.5.
- First configure GHDL with the proper arg
./configure --with-llvm-config
. Ifllvm-config
is not in your path, you can specify it:./configure --with-llvm-config=LLVM_INSTALL/bin/llvm-config
. - Then, build with
make
and install withmake install
.
Example:
$ cd <ghdl>
$ mkdir build
$ cd build
$ ../configure --with-llvm-config --prefix=PREFIX
$ make
$ make install
Hint
If you want to have stack backtraces on errors (like assert failure or index of out bounds), you need to configure and build libbacktrace
from GCC (you don’t need to configure GCC). Then add the following arg to configure: --with-backtrace-lib=/path-to-gcc-build/libbacktrace/.libs/libbacktrace.a