Skip to content

How to Compile Giri

Mingliang Liu edited this page May 11, 2014 · 14 revisions

Build and Install the LLVM

  • You need the same version of LLVM as Giri to compile it (3.1, 3.4 and svn version)
  • You'd better build the Release+Debug+Assert version of LLVM
  • If you build the LLVM using GCC, version 4.7.3-r1 or higher is recommended.

Get the source code of Giri

Currently the Giri uses the same version as LLVM.

  • 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.
    • --enable-debug-symbols to build the Debug version of Giri (Default)
    • --enable-optimized to build the release version of Giri
  • Moreover, you can specify the CC and CXX environment variables. The compiler should support -std=c++11 compile flags.

Make

  • run make in the build/ directory
  • make test in the top level of Giri to check your compilation
Clone this wiki locally