Skip to content

Building ChakraCore

Tom Care edited this page Jan 13, 2016 · 30 revisions

You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2013 or 2015, as long as C++ support is installed*. ChakraCore currently only works on Windows, but support for Linux is on our roadmap.

To build ChakraCore:

  • Clone ChakraCore through git clone https://github.com/Microsoft/ChakraCore.git
  • Open Build\Chakra.Core.sln in Visual Studio.
  • Select the target Platform and Configuration and build the solution.
  • Build output will be under Build\VcBuild\bin.

Alternatively, run msbuild on the command line:

msbuild /m /p:Platform=... /p:Configuration=... Build\Chakra.Core.sln

Platform

ChakraCore can be built for 3 Platforms: x86, x64 and arm.

Build for arm: Due to toolset dependency, you will need following to build for the arm platform:

Configuration

ChakraCore supports 3 configurations:

  • Debug: Not optimized, with full runtime checks and all test hooks.
  • Release: Fully optimized, with fewer runtime checks and no test hooks.
  • Test: Optimized, very similar to Release but with more runtime checks and most test hooks.

Deployment

If you use ChakraCore you will need to deploy ChakraCore.dll with your application. You may also need to redistribute MSVC runtime libraries because ChakraCore.dll has runtime dependency on MSVC libraries by default. For more information see Redistributing Visual C++ Files.

Alternatively, you can build ChakraCore without MSVC runtime dependency. Pass an additional parameter to msbuild so that ChakraCore links to MSVC libraries statically:

msbuild ... /p:RuntimeLib=static_library ...
Clone this wiki locally