我正在构建一个旧版本的js v8 https://github.com/v8/v8/wiki/Building-with-GN,正是出于此目的https://github.com/tunz/js-vuln-db/blob/master/v8/CVE-2017-5070.md。我尝试在2017年5月17日左右检查分支提交(git reset --hard a8424d592feff907c3f9a47310765c81321abe7b
)的旧分支,并使用命令tools/dev/v8gen.py -b "V8 Linux64 - debug builder" -m client.v8 CVE-2017-5070 -vv
进行构建,但发生错误:
################################################################################
/usr/bin/python -u tools/mb/mb.py gen -f infra/mb/mb_config.pyl -m client.v8 -b V8 Linux64 - debug builder out.gn/CVE-2017-5070
Writing """\
is_component_build = true
is_debug = true
target_cpu = "x64"
use_goma = true
v8_enable_backtrace = true
v8_enable_slow_dchecks = true
v8_has_valgrind = true
v8_test_isolation_mode = "prepare"
""" to /home/cui/github/v8/v8/out.gn/CVE-2017-5070/args.gn.
/home/cui/github/v8/v8/buildtools/linux64/gn gen out.gn/CVE-2017-5070 --check
-> returned 1
ERROR at //gni/v8.gni:121:3: Dependency not allowed.
executable(target_name) {
^------------------------
The item //:mksnapshot
can not depend on //build/config/sanitizers:deps
because it is not in //build/config/sanitizers:deps's visibility list: [
//build/config:exe_and_shlib_deps
]
GN gen failed: 1
Traceback (most recent call last):
File "tools/dev/v8gen.py", line 304, in <module>
sys.exit(gen.main())
File "tools/dev/v8gen.py", line 298, in main
return self._options.func()
File "tools/dev/v8gen.py", line 166, in cmd_gen
gn_outdir,
File "tools/dev/v8gen.py", line 208, in _call_cmd
stderr=subprocess.STDOUT,
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'client.v8', '-b', 'V8 Linux64 - debug builder', 'out.gn/CVE-2017-5070']' returned non-zero exit status 1
我不知道如何构建旧版本的js v8,你能给我一些建议吗?我真的需要构建这个旧版本而不是最新版本
答案 0 :(得分:0)
尝试在gclient sync
之后运行git reset
(或git checkout
,这将是更好的选择)。这有帮助吗?