git clone https://github.com/canlockkeyin/SVF-example.git
npm install svf-lib
You are able to check your installed npm package and its path via command npm list
$ npm list
/home/samsung
└── [email protected]
Then your_path_to_SVF is /home/samsung/node_modules/SVF/SVF-linux
or /home/samsung/node_modules/SVF/SVF-osx
.
your_path_to_LLVM is /home/samsung/node_modules/llvm-10.0.0.obj
.
cmake -DSVF_DIR=your_path_to_SVF -DLLVM_DIR=your_path_to_LLVM
make
clang -emit-llvm -S analyze.c -o analyze.ll
./bin/svf-ex analyze.ll