P1umerのStudio.

V8 Environmental Configuration

字数统计: 237阅读时长: 1 min
2018/07/01 Share

mark

linux

Pre Work

  • Install Git

    1
    apt-get install git
  • Install depot_tools

    1
    2
    git clone https://chromium.googlesource.com/chromium/tools/depot_tools
    export PATH=`pwd`/depot_tools:"$PATH"

Key Step

1
2
3
4
5
6
7
gclient
mkdir v8
cd v8
fetch v8
-
tools/dev/v8gen.py x64.debug
ninja -C out.gn/x64.debug
此时编译的是最新版本的v8 若想切换分支,在(-)处执行以下命令:
1
2
3
git reset --hard +hash
tools/dev/v8gen.py x64.debug
ninja -C out.gn/x64.debug

Windows

Prework

Key STAP

  • 打开适用于 VS 2017 的 X64 本机工具命令提示框
  • 再次确认上一步已完成,注意不是cmd窗口
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    >git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

    >SET depot_tools 环境变量,将其放在存有python.exe的环境变量前或者直接置顶

    >set DEPOT_TOOLS_WIN_TOOLCHAIN=0

    >set GYP_MSVS_VERSION=2017

    >mkdir v8 && cd v8

    >fetch v8

    >cd v8

    >gn gen --ide=vs out.gn\x64_solution

    >python tools\dev\v8gen.py x64.release

    >ninja -C out.gn\x64.release
CATALOG
  1. 1. linux
    1. 1.1. Pre Work
    2. 1.2. Key Step
  2. 2. Windows
    1. 2.1. Prework
    2. 2.2. Key STAP