Note: There are manual steps that should be automated/simplified at some point.
- Clone SharpLang to
<SharpLang>
with submodules. - Download
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v3-rev1.7z/download
and extract it in<SharpLang>\deps
. - Download and install CMake. Alternatively, extract the zip archive and add
bin
directory to PATH. - Download and install python. Alternatively, set
PYTHON_EXECUTABLE:FILEPATH
variable in<SharpLang>\deps\llvm\build\CMakeCache.txt
to<SharpLang>/deps/mingw32/opt/bin/python.exe
. - Download SWIG and extract it in
<SharpLang>\tools\swig
. - Run
<SharpLang>\deps\build_llvm_clang_vs2013_x32.bat
. This will build LLVM and Clang both in RelWithDebInfo and Debug mode with VS2013. - Open
<SharpLang>\build\vs2013\SharpLang.sln
. - Switch Active solution platform to x86 in Build > Configuration Manager.
- Build and play with tests. NUnit Test Adapter extension or Resharper has to be installed in order to get test cases listed in Test Explorer.
Note: In default mode (Debug and RelWithDebInfo) the build artefacts require about 14 GB of disk space.
Apply the same instruction as x86, except that:
- Download mingw-w64 x86_64 instead,
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z/download
and extract it in extract it to<SharpLang>\deps\mingw64
. - Run
<SharpLang>\deps\build_llvm_clang_vs2013_x64.bat
. 9 Switch Active solution to x64.
You need to have a working installation of Mono runtime for the compiler to compile and run.
Following instructions are for x64 build:
- Clone SharpLang to
<SharpLang>
with submodules - Make sure CMake is installed, and go to
deps
folder and run./build_llvm_clang_linux.sh
- Go to
build
folder and run./premake5-linux --file=premake4.lua gmake
- Run
mkdir -p gmake/runtime/native && (cd gmake/runtime/native && cmake ../../../..)
- Run
make -C gmake config="debug_x64"
- Somehow you will need mscorlib.dll compiled for Linux host (update to come soon).
- Play with compiler or unit tests: go to
build/gmake/lib/Debug_x64
folder and runnunit-console SharpLang.Compiler.Tests.dll