Department of Computer Science and Technology

SOAAP

Building SOAAP and related tools

We are pleased to announce that an early prototype version of the Clang/LLVM- based SOAAP toolchain is now available to try out. Please send any queries to Khilan Gudka and Robert Watson.

Some preliminary notes:

  • Currently SOAAP is built, run and tested on FreeBSD 10.0.
  • Create a directory in which all soaap-related files will reside. In these instructions, we will assume the directory '/home/me/workspace' is used for this purpose.
  • CMake >= 2.8.9 and Ninja 1.0.0 are required to build Clang/LLVM and the Soaap LLVM pass.
  • SOAAP includes libxo as a git submodule, which it uses for producing output in text, HTML, JSON and XML.
  • SOAAP requires libc++ r194154 or newer. If you cannot build SOAAP, it might be because your libc++ isn't new enough. A more recent version can be installed from ports. Add -DCMAKE_PREFIX_PATH=/usr/local when building SOAAP to ensure CMake finds a ports installation of libc++.

LLVM/Clang

[me@mymachine ~/workspace]$ git clone https://github.com/CTSRD-SOAAP/llvm.git
[me@mymachine ~/workspace]$ cd llvm/tools
[me@mymachine ~/workspace/llvm/tools]$ git clone https://github.com/CTSRD-SOAAP/clang.git
[me@mymachine ~/workspace/llvm/tools]$ cd ..
[me@mymachine ~/workspace/llvm]$ mkdir Build
[me@mymachine ~/workspace/llvm]$ cd Build
[me@mymachine ~/workspace/llvm/Build]$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
[me@mymachine ~/workspace/llvm/Build]$ ninja (note: you can customise the number of threads used by ninja using the -j flag)

SOAAP tool

[me@mymachine ~/workspace/llvm/Build]$ cd ../..
[me@mymachine ~/workspace]$ git clone --recursive https://github.com/CTSRD-SOAAP/soaap.git
[me@mymachine ~/workspace]$ cd soaap
[me@mymachine ~/workspace/soaap]$ LLVM_PREFIX=`pwd`/../llvm/Build ./run-cmake.sh
[me@mymachine ~/workspace/soaap]$ ninja -C Build/Release

The soaap binary has now been built at Build/Release/bin/soaap. To build a debug version of SOAAP, run the following instead:

[me@mymachine ~/workspace/soaap]$ BUILD_TYPE=Debug LLVM_PREFIX=`pwd`/../llvm/Build ./run-cmake.sh
[me@mymachine ~/workspace/soaap]$ ninja -C Build/Debug

Note that because SOAAP depends on submodules, you will need to ensure that they are updated when you pull from the SOAAP git repository. This can be achieved by passing the --recurse-submodules flag to git pull, as in:

[me@mymachine ~/workspace/soaap]$ git pull --recurse-submodules