Missing libLLVMCoverage.so during runtime compilation for android

Hi,

I have followed instruction and some tips from forum, but I’m getting error during compilation. Runtime requires libLLVMCoverage, and there is no instruction for compiling it. My commands:

# copy cmake config
cp cmake/config.cmake build-arm-api-28

# goto build dir
cd build-arm-api-28

# set LLVM from $ANDROID_SDK
sed -i 's/set(USE_LLVM OFF)/set(USE_LLVM \/home\/piotr\/Android\/Sdk\/ndk\/21.3.6528147\/toolchains\/llvm\/prebuilt\/linux-x86_64\/bin\/llvm-config)/g' config.cmake

# rum cmake
cmake .. \
    -DUSE_RPC=ON \
    -DCMAKE_SYSTEM_NAME=Linux \
    -DCMAKE_SYSTEM_VERSION=1 \
    -DLLVM_INCLUDE_DIRS=/home/piotr/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/include \
    -DCMAKE_C_COMPILER=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi28-clang \
    -DCMAKE_CXX_COMPILER=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi28-clang++ \
    -DCMAKE_FIND_ROOT_PATH=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/ \
    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
    -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
    -DMACHINE_NAME=armv7a-linux-gnu

# call make
TVM_BUILD_PATH=/home/piotr/projects/odai/tvm/tvm/build-arm-api-28 make -j4

After few minutes I’m getting following error at the end of whole compilation:

[  1%] Built target project_libbacktrace
[  1%] Built target tvm_libinfo_objs
[ 10%] Built target tvm_runtime_objs
[ 10%] Built target tvm_runtime
[ 99%] Built target tvm_objs
make[2]: *** No rules for making '/home/piotr/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/lib64/libLLVMCoverage.so', required by 'libtvm.so'. Stop.
CMakeFiles/Makefile2:246: recipe for target 'CMakeFiles/tvm.dir/all' failed
make[1]: *** [CMakeFiles/tvm.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

–edit–

I have search for this file, only found in /usr/lib/llvm-9 file LibLLMVCoverage.a. During compilation, there was error about missing headers, so I have linked headers from system-installed llvm in version 9 (I have linked system-installed llvm to android-sdk llvm include folder). My cmake version 3.10.2