最新 Google V8 编译 (2015-12-09)

How to Download and Build V8

 请注意,基于arm系统的最低要求ARMv6 + VFP2。

V8 JavaScript Engine
V8 is Google’s open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://github.com/v8/v8/wiki

  1. Download the source code
    V8的git存储库位于:这里
    V8的主分支也正式git在github镜像:这里

    不要只是git clone这些url的如果你想从你checkout编译V8,请遵循下面说明的一切正确设置。
    先决条件
    Checkout depot tools, and run
    fetch v8
    Chromium and Chromium OS use a package of scripts called depot_tools to manage checkouts and code reviews.
    The depot_tools package includes gclient, gcl, git-cl, repo, and others.

  2. Build V8
    There is a page Building with GYP in the V8 wiki. In brief, you should use GYP to generate a Visual Studio solution and then build it.
    Install Python, Subversion client; make it available from a command line.
    Open Visual Studio Command Prompt, do next steps there.
  3. Fetch V8 sources into some directory, say it would be named v8-build:

svn checkout http://v8.googlecode.com/svn/trunk v8-build

for the recent version (either some tagged version, for example http://v8.googlecode.com/svn/tags/3.28.57)

4.On Windows you need Cygwin: svn checkout http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 v8-build/third_party/cygwin

(see actual URL in a v8-build/DEPS file)

5.Fetch GYP:

svn checkout http://gyp.googlecode.com/svn/trunk@1831 v8-build/gyp

6.Optionally fetch ICU:

svn checkout https://src.chromium.org/svn/trunk/deps/third_party/icu46@258359 v8-build/third_party/icu

7.Make tools available in the command line:
•set CYGWIN_ROOT=%cd%\v8-build\third_party\cygwin
•set PATH=%CYGWIN_ROOT%\bin;%PATH%
•set PYTHONPATH=%cd%\v8-build\gyp\pylib
•v8-build\third_party\cygwin\setup_mount.bat
•v8-build\third_party\cygwin\setup_env.bat

8.Run GYP with desired options:

python v8-build\build\gyp_v8 -Dcomponent=static_library -Dtarget_arch=x64 -v8_enable_i18n_support=0 -Dv8_use_snapshot=0

(see allowed variables in v8-build\build\features.gypi)

9.Build generated project with Visual Studio using the Cygwin environment:

msbuild /m /p:UseEnv=true /p:Configuration=Release /p:Platform=x64 v8-build\tools\gyp\v8.vcxproj

10.Result libraries should be in the v8-build\build directory

I use a Python script to automate the steps above.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值