Cannot generate solution file of v8 with gyp for visual studio 2013
Asked Answered
P

2

9

This is really painful. I followed the instruction from https://github.com/v8/v8/wiki/Building%20with%20Gyp.

fetch v8
cd v8

And when fetching is finished,

set DEPOT_TOOLSPWIN_TOOLCHAIN=0

Instruction said to use command "python build\gyp_v8" but obviously, my v8 clone does not have "build\gyv_v8" file. I googled about this, And found gyp_v8 is in that "gypfiles" folder, not in "build" folder. So command I used was

python gypfiles\gyp_v8

It seemed like working at first. cmd put out the response "Updating projects from gyp files...". No warning or error. But nothing happens! I think it should generate solution file for my VS. But even after process is finished, no solution file was found.

Am I missing something? Im almost dying for this. T-T Please, help me.

Plectron answered 24/6, 2016 at 14:16 Comment(0)
C
3

Try setting this environment variable before running GYP:

set GYP_GENERATORS=msvs

Then, after running GYP, do a recursive search for .sln files in your V8 directory :)

Colter answered 11/7, 2016 at 14:49 Comment(4)
According to documentation, one should use 'ninja' generators for Visual Studio. Why are there two different generators for VS?Styliform
This is not working for me. :p sigh~ Anyway, Thanks for your post.Plectron
Sorry to hear it. I ran into exactly this problem recently, and that variable did the trick for me.Colter
Works! I used this tip for building the 5.3 release branch of V8 when nothing else worked.Superfluous
S
2

It seems the google is using a new build system instead of gyp. It is called "gn" and i could generate the Visual Studio solution by executing following code in the v8 directory:

gn gen --ide=vs out/Default

The all.sln is then located in .\v8\out\Default\

Source: http://dev.chromium.org/developers/how-tos/get-the-code

Styliform answered 9/7, 2016 at 8:10 Comment(2)
that command result says "gn.py: Could not find gn executable at: ...\v8\buildtools\win\gn.exe". what am i missing?Plectron
Try to execute gclient sync before gn. I tried a lots of stuff before I found this, so it is possible that I downloaded something beforehand. Have you installed depot tools? (commondatastorage.googleapis.com/chrome-infra-docs/flat/…)Styliform

© 2022 - 2024 — McMap. All rights reserved.