Search code examples
pythonc++visual-studiov8embedded-v8

Unable to build V8 in Windows 10


I'm using this link as reference (https://medium.com/angular-in-depth/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4) to build v8 but i think its out of date or i'm doing something wrong. I can't run this (ninja -C out.gn/x64.release) command because its showing this error constantly

ninja: error: loading 'build.ninja': The system cannot find the file specified.

ninja: Entering directory `out.gn\foo

also im getting this error too

D:\v8_dev\v8Engine\v8>gn args out.gn\foo
Waiting for editor on "D:\v8_dev\v8Engine\v8\out.gn\foo\args.gn"...
Generating files...
Traceback (most recent call last):
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 561, in <module>
    sys.exit(main())
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 557, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 371, in CopyDlls
    _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 346, in _CopyRuntime
    suffix)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 284, in _CopyUCRTRuntime
    assert len(ucrt_files) > 0
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:49:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: D:/v8_dev/v8Engine/v8/out.gn/foo/
Command: D:/v8_dev/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe D:/v8_dev/v8Engine/v8/build/vs_toolchain.py copy_dlls D:/v8_dev/v8Engine/v8/out.gn/foo Release x64
Returned 1.
See //BUILD.gn:905:1: which caused the file to be included.
action("postmortem-metadata") {
^------------------------------

Ultimately i want it to work like as its shown in the embedded pictureenter image description here


Solution

  • if you are looking for the solution then follow this link (https://github.com/pmed/v8-nuget) for visual studio users, its working really well without all the hassle.