15 lines
384 B
Text
15 lines
384 B
Text
|
=========
|
||
|
Converting LLVM IR to an executable file
|
||
|
=========
|
||
|
clang++ -S -emit-llvm a.cpp // get llvm ir
|
||
|
llc a.ll -filetype=obj // get .o file
|
||
|
g++ -o a.out a.o // converting to executable file
|
||
|
./a.out
|
||
|
echo $? // get the return value of a.out
|
||
|
|
||
|
=========
|
||
|
See also
|
||
|
=========
|
||
|
http://llvmlite.pydata.org/en/latest/
|
||
|
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/
|