Building v8 using Visual Studio 2015

1,804 views
Skip to first unread message

Michael Collins

unread,
Jul 23, 2015, 11:19:52 AM7/23/15
to v8-users
I managed to get v8 to build under Visual Studio 2015 RTM. The issues that I ran into were with treating warnings as errors. Some things that were allowed under VS2013 now cause warnings with the VS2015 C++ compiler. There's a warning about a "typedef enum" without a name in dbghelp.h (line 1544) that causes some of the warnings. Others appear to be reinterpret_cast<T> warnings going from int to void *. I'm assuming since this was ok in VS2013 that they're also ok in VS2015, but I haven't done a significant amount of testing with the VS2015 build yet.

To get this to work, follow the wiki instructions up until the point that you run "python build\gyp_v8". Before doing that, you have to turn off the /WX compiler flag. The only way that I found to do this was to edit build/standalone.gypi and modify line 682 by setting 'WarnAsError' to 'false'. After doing that, I ran the build\gyp_v8 script:

    python build\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library

Finally, run MSBuild to build the project:

    msbuild /p:Configuration=Release build\All.sln

I tried different options like passing in "-Dwerror=no" or trying to turn off /WX by passing properties to MSBuild, but nothing else seems to work.Editing standalone.gypi seems like the only option. If anyone has any other options for turning this off with Visual Studio, please let me know.

Jochen Eisinger

unread,
Jul 27, 2015, 12:54:01 PM7/27/15
to v8-users
I landed some config changes to make v8 compile with MSVS 2015, however, I haven't ran tests yet.

Since we don't have MSVS 2015 builders yet, that configuration might break, however, eventually, we'll switch to MSVS 2015, just not yet now.

best
-jochen

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Eng

unread,
Oct 27, 2015, 1:49:46 PM10/27/15
to v8-users
I was only able to get V8 to build with VS2015 by editing build/standalone.gypi as Michael Collins posted. At this time, is V8 tested to work with MSVS 2015? Is there a plan to switch soon?

Thanks,
Michael

Mike Moening

unread,
Oct 27, 2015, 2:27:45 PM10/27/15
to v8-users
Are you building & debugging with the Visual Studio IDE? 
Using a Visual Studio solution (.sln) file?
I'm still on VS2013 and would LOVE to be able to use the IDE over DOS ninja commands.

Can you point me to those instructions on how to make this happen?

Thanks a lot!

Michael Eng

unread,
Oct 27, 2015, 3:34:26 PM10/27/15
to v8-users
I followed https://chromium.googlesource.com/v8/v8/+/master/docs/building_with_gyp.md

1. Install Visual Studio 2015 Enterprise (Visual Studio 2013 Ultimate is also installed if that matters).
2. Download and unpack depot_tools to C:\depot_tools
3. cd to C:\depot_tools
4. gclient sync
5. fetch v8
6. cd C:\depot_tools\v8
7. python build/gyp_v8 -Dtarget_arch=ia32 -Dcomponent=shared_library -Dv8_enable_i18n_support=0
8. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" /build Debug build/all.sln

If you want the above to work with VS2013 you may need to run SET GYP_MSVS_VERSION=2013 
Reply all
Reply to author
Forward
0 new messages