(源)V8 Engine 編譯

v8 engine編譯javascript

V8 Engine 編譯


概述

v8 Engine 用來編譯javascript ,chrome 瀏覽器就是使用該引擎, v8引擎是獨立模塊,c++能夠嵌入js腳本並執行html

windows下編譯

1.工具

v8

svn checkout http://v8.googlecode.com/svn/branches/bleeding_edge/ v8java

python

svn co http://src.chromium.org/svn/trunk/tools/thirdparty/python26@89111 thirdparty/python26python

cygwin

svn co http://src.chromium.org/svn/trunk/deps/thirdparty/cygwin@231940 thirdparty/cygwinc++

icu

svn co https://src.chromium.org/chrome/trunk/deps/thirdparty/icu46 thirdparty/icugit

gyp

svn co http://gyp.googlecode.com/svn/trunk build/gypgithub

2.編譯步驟

  1. 把下載後的third_party拷貝到v8目錄下,設置python的環境變量,方便直接調用python命令
  2. cd 到v8目錄下,執行命令python build\gyp_v8 生成工程文件
  3. "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" /build Release build\All.sln

3.調試步驟

使用vs2010打開All.sln編譯好的工程,能夠進行調試,設置啓動項爲 sample/shell,運行shell print('hello world!');web

4.參考資料

相關文章
相關標籤/搜索