- Properly set up environment
- Patched HPVM Compiler: https://gitlab.engr.illinois.edu/llvm/hpvm-release
- Android NDK
- Accompanying Android application: https://github.com/MatevzFa/hpvm-rt-android-app
Set up the following environment variables. You can use set-env.example.sh
as a starting point.
ANDROID_NDK
: Path to the Andorid NDK (e.g. .../Android/Sdk/ndk/21.3.6528147)HPVM_ROOT
: Path to the root of hpvm-release projectHPVM_BUILD
: Path to hpvm build directoryTARGET
: Android NDK Target. Passed to clang -target (e.g. "aarch64-linux-android21")LIB_INSTALL_PATH
: points to .../app/src/main/cpp/libsINCLUDE_INSTALL_PATH
: points to .../app/src/main/cpp/include
After the environment is set up, run the following command to patch HPVM's GenHPVM pass.
./patch-hpvm.sh
The Makefile defines the HPVM compilation pipeline. If the environment is set up correctly, building the library with HPVM code is as simple as running
make
You can install the library into the Android application by running
make install
This installs example-hpvm-sum.h
and libexample-hpvm-sum.so
into correct folders within the Android application source tree.
Code in this project cannot be executed by itself. It has to be built into an Android application. See https://github.com/MatevzFa/hpvm-rt-android-app for further information.