diff --git a/README.md b/README.md index c58617156c67..682c1454d9e4 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,11 @@ You can dive into `build-ventus.sh` file to see the detailed information about b ### 3: Bridge icd loader -Run `export LD_LIBRARY_PATH=/ventus-llvm/install/lib` to tell OpenCL application to use your own built `libOpenCL.so`, also to correctly locate LLVM shared libraries +Run `export VENTUS_INSTALL_PREFIX=` to set `VENTUS_INSTALL_PREFIX` environment variable(system environment variable recommended) -Run `export OCL_ICD_VENDORS=/libpocl.so` to tell ocl icd loader where the icd driver is. +Run `export LD_LIBRARY_PATH=${VENTUS_INSTALL_PREFIX}/lib` to tell OpenCL application to use your own built `libOpenCL.so`, also to correctly locate LLVM shared libraries + +Run `export OCL_ICD_VENDORS=${VENTUS_INSTALL_PREFIX}/lib/libpocl.so` to tell ocl icd loader where the icd driver is. Finally, run `export POCL_DEVICES="ventus"` to tell pocl driver which device is available(should we set ventus as default device?). diff --git a/assemble.sh b/assemble.sh index 85cb064522a7..e9f4174bc0f4 100755 --- a/assemble.sh +++ b/assemble.sh @@ -2,10 +2,7 @@ # This script will be used by pocl -# echo "converting object file:" -# echo $1 -script_dir=$(cd "$(dirname "$0")" && pwd) -export PATH=$script_dir/install/bin:$PATH +export PATH=${VENTUS_INSTALL_PREFIX}/bin:$PATH if [[ -f $1.vmem ]];then rm $1.vmem fi diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 60e1f29620af..8ea72a396cae 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -1370,3 +1370,11 @@ endif() if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS) add_subdirectory(utils/llvm-locstats) endif() + +install(DIRECTORY ../utils/ldscripts + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +) + +install(FILES ../assemble.sh + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/scripts" +)