How to build v8 dynamic libraries under Windows and Visual Studio 2015
<p>I've been able to build v8 successfully under <strong>Windows 8.1</strong> and <strong>Visual Studio 2015 Update 2</strong> with the build chain based on <code>GN</code> <a href="https://github.com/v8/v8/wiki/Building-with-GN" rel="nofollow">Building with GN</a> but I can't find how to build the v8 library. Basically I want to enable <code>component=shared_library</code> but I can't find how to do it...</p>

<p>Examples such as <em>helloworld.exe</em> are compiling and are working.</p>

<p>Here is how I built it so far: </p>

<pre><code>set DEPOT_TOOLS_WIN_TOOLCHAIN=0
mkdir depot_tools
cd depot_tools
curl -O https://storage.googleapis.com/chrome-infra/depot_tools.zip
cmake -E tar xf "depot_tools.zip" --format=zip
SET PATH=%CD%;%CD%\python276_bin;%PATH%
cd ..
gclient config https://chromium.googlesource.com/v8/v8
set GYP_MSVS_VERSION=2015
gclient sync
cd v8
python tools/dev/v8gen.py x64.release
ninja -C out.gn/x64.release
</code></pre>

<p>I've also tried the old fashion way using <code>gyp</code> without success (does not compile):</p>

<pre><code>SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
mkdir depot_tools
cd depot_tools
curl -O https://storage.googleapis.com/chrome-infra/depot_tools.zip
cmake -E tar xf "depot_tools.zip" --format=zip
SET PATH=%CD%;%CD%\python276_bin;%PATH%
cd ..
gclient config https://chromium.googlesource.com/v8/v8
set GYP_MSVS_VERSION=2015
set GYP_GENERATORS=ninja
gclient sync
cd v8
python gypfiles\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library
ninja -C out\Release_x64 all
</code></pre>

<p>Any advise?</p>