Skip to content

How to Compile Giri

Mingliang Liu edited this page Aug 19, 2014 · 14 revisions

Build LLVM

  • Need the same version of LLVM as Giri (3.1, 3.4 and svn version)
  • Recommend Release+Debug+Assert version of LLVM and Giri
  • Compile with: GCC 4.7.3-r1 and higher, or Clang 3.4 and higher
  • Refer to utils/install_llvm.sh if you find it too complicated

Get Giri

  • You can checkout the newest version from the repository
  • For stable release version, please switch to a specific release tag. Run git tag to show all versions.
  • Or simply download tar files of specific version from release page

Configure

  • Create a build/ directory to avoiding pollute the source code directory
  • ../configure with following options
    • --with-llvmsrc=$HOME/software/llvm/
    • --with-llvmobj=$HOME/software/llvm/build/
    • --enable-debug-runtime to build the debug version of the Giri runtime as well as DEBUG_GIRI_RUNTIME macro
      • This option will build the debug version of instrumentation code, for developers only.
    • Other options should follow LLVM build ones, e.g. --enable-debug-symbols, --enable-optimized
  • The compiler CXX should support -std=c++11 compile flags.

Build and Test

  • Run make in the build/ directory to compile Giri passes
  • Run make in the test/ directory to check your compilation
Clone this wiki locally