Skip to content
Anton Gushcha edited this page Feb 12, 2015 · 4 revisions

This page describes a way that only helped me to compile hjass under Windows 7 x86_64 using Haskell Platform 2014.2.0.0 and MinGW.

Actually Haskell Platform goes with its own MinGW inside, but I use following sheme:

  1. Install MinGW+MSYS first to get cute terminal

  2. Install Haskell Platform, it would override location of gcc and other building tools

Building LLVM

  1. Install CMake

  2. Install subversion client link

  3. Go to favorite source code folder and call (from MSYS terminal):

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm
svn switch http://llvm.org/svn/llvm-project/llvm/branches/release_34
cd tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd clang
svn switch http://llvm.org/svn/llvm-project/cfe/branches/release_34
cd tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
cd extra
svn switch http://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_34
cd ../../../../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
cd compiler-rt
svn switch http://llvm.org/svn/llvm-project/compiler-rt/branches/release_34
cd ../..
  1. Now we are ready for building (prepare, it takes ages...):
mkdir build
cd build
cmake .. -DCMAKE_CXX_FLAGS="-O3" 
make
make install

Note: optimization needed because debug symbols don't fit symbol table and you would be very upset to see the unresolvable error at the end of several-hours compilation

  1. Add LLVM bin folder to your $PATH environment variable (note: to system wide PATH, MSYS takes only this one, not user one)

Compilation of hjass

The easy part:

  1. git clone https://github.com/NCrashed/hjass

  2. cabal install --dependencies-only --enable-tests

  3. cabal configure --ghc-options="-pgml g++" The parameter is important, unless you would get voodoo linker errors (no libstdc++ is passed to linker).

  4. cabal test

Clone this wiki locally