Create LLVM IR using Java
Create some dir where you put the projects in
mkdir java-llvm-ir-builder-dev
cd java-llvm-ir-builder-dev
Download mx
git clone https://github.com/graalvm/mx.git
export PATH="mx:$PATH"
Use git clone to download this project
git clone https://github.com/pointhi/java-llvm-ir-builder
Enter directory and build project
cd java-llvm-ir-builder
mx build
TODO: there are some parts missing in this setup manual, regarding dependencies
By compiling this project, we get some new mx commands to work with:
mx irbuilder-out path_to_file.bc # output the .ll equivalent ir as it's parsed by Sulong
mx irbuilder-test32 # Run LLVM 3.2 compatible irwriter tests (compile testsuite and test the written output)
mx irbuilder-test38 # Run LLVM 3.8 compatible irwriter tests (compile testsuite and test the written output)
mx irbuilder-testgen38 # Create LLVM 3.8 compatible LLVM-IR Testcases from scratch and use them to test Sulong