Windows build instructions

Alessandro Pignotti edited this page Jan 25, 2016 · 19 revisions

The following instructions will guide you in building the lastest version of cheerp on Windows systems. Building the core compiler on Windows using Microsoft Visual Studio is fully supported, but building the base libraries (newlib, libc++, libc++abi) is not. You can grab a working copy from the latest release from any platform as they are platform independent.


Get the sources

Open a cmd shell and execute the following commands to download the source code for the Cheerp enabled llvm and clang repositories.

git clone
cd cheerp-llvm/tools/
git clone clang

Generate Microsoft Visual Studio projects using CMake

Start the CMake GUI tool and point the source code directory to where you have cloned the Cheerp LLVM repository. Also set the binaries directory to the build subdirectory. Now press Configure

Now select your version of Visual Studio, since some C++11 features are used you need VS2012 at least.

Wait until the project is configured. Now you need to tick the Advanced box, set the LLVM_INSTALL_PREFIX variable to "C:\cheerp" and press Configure again.

Now press Generate

Build Visual Studio project

Open the cheerp-llvm\build\LLVM.sln file.

Make sure the ALL_BUILD project is selected and Release mode is enabled, then click Build Solution

Go grab some coffe and relax, it is going to take some time.


When the build is finished, select the INSTALL project in the CMakePredefinedTargets group and build it.

Finally you need to make a copy of the c:\cheerp\bin\clang.exe and call it clang++.exe

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.