본문으로 바로가기

V8: How to Build

category General 2020. 5. 7. 05:56

1. Install depot tools

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=/home/syine/repos/depot_tools:$PATH

 

2. fetch v8

fetch v8
cd ./v8

 

본인은 이 단계에서 너무 과하게 느리다는 생각이 들어서 (6시간 이상 소요) wget, curl, apt-get을 IPv4로 강제 설정했다.

 

3. Commit Reversion (Optional)

이전 버전을 빌드하고 싶으면 commit hash를 찾아서 롤백해주면 된다.

 

git checkout [hash]
gclient sync -D

 

4. Install Build Dependencies (Linux Only)

./build/install-build-deps.sh

 

5. Build

./tools/dev/gm.py [config]

 

x64 기준으로 디버그 빌드는 x64.debug, 릴리즈 빌드는 x64.release를 쓰면 된다.

 

Reference

https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html

https://v8.dev/docs/build