WindowsCompilation
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:
-
Install MinGW+MSYS first to get cute terminal
-
Install Haskell Platform, it would override location of gcc and other building tools
-
Install CMake
-
Install subversion client link
-
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 ../..
- 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
- Add LLVM
bin
folder to your$PATH
environment variable (note: to system wide PATH, MSYS takes only this one, not user one)
The easy part:
-
git clone https://github.com/NCrashed/hjass
-
cabal install --dependencies-only --enable-tests
-
cabal configure --ghc-options="-pgml g++"
The parameter is important, unless you would get voodoo linker errors (no libstdc++ is passed to linker). -
cabal test