forked from alintong-0/backend-v8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows_64.cmd
86 lines (75 loc) · 2.15 KB
/
windows_64.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
chcp 65001
set VERSION=%1
echo =====[ Init Env ]=====
mkdir C:\v8_build
copy .\replaceV8.py C:\v8_build\replaceV8.py
copy .\fixRunning.py C:\v8_build\fixRunning.py
C:
cd v8_build
echo =====[ Getting Depot Tools ]=====
powershell -command "Invoke-WebRequest https://storage.googleapis.com/chrome-infra/depot_tools.zip -O depot_tools.zip"
7z x depot_tools.zip -o*
set PATH=%CD%\depot_tools;%PATH%
set GYP_MSVS_VERSION=2019
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
cd depot_tools
dir
cd ..
call gclient
cd depot_tools
call git reset --hard 8d16d4a
dir
cd ..
set DEPOT_TOOLS_UPDATE=0
mkdir v8
cd v8
echo =====[ Fetching V8 ]=====
call fetch v8
cd v8
call git checkout refs/tags/%VERSION%
cd test\test262\data
call git config --system core.longpaths true
call git restore *
cd ..\..\..\
call gclient sync
@REM echo =====[ Patching V8 ]=====
@REM node %GITHUB_WORKSPACE%\CRLF2LF.js %GITHUB_WORKSPACE%\patches\builtins-puerts.patches
@REM call git apply --cached --reject %GITHUB_WORKSPACE%\patches\builtins-puerts.patches
@REM call git checkout -- .
echo =====[ add ArrayBuffer_New_Without_Stl ]=====
node %~dp0\node-script\add_arraybuffer_new_without_stl.js .
@REM 这里处理v8源码仓库镜像
echo =====[ Reset V8 Git ]=====
cd .\build
dir
cd .\toolchain
dir
cd .\win
dir
cd ..\..\..\
echo =====[ Fix Python ]=====
cd ..\..\
python fixRunning.py
dir
echo =====[ replace V8 File ]=====
call git clone -b Branch_8.4.371.19 "https://github.com/alintong-0/v8.git" v8_temp
dir
python replaceV8.py
dir
cd ./v8/v8
dir
echo =====[ Building V8 ]=====
call gn gen out.gn\x64.release -args="target_os=""win"" target_cpu=""x64"" v8_use_external_startup_data=false v8_enable_i18n_support=false is_debug=false v8_static_library=true is_clang=false strip_debug_info=true symbol_level=0 v8_enable_pointer_compression=false"
call ninja -C out.gn\x64.release -t clean
call ninja -C out.gn\x64.release wee8
md output\v8\Lib\Win64
copy /Y out.gn\x64.release\obj\wee8.lib output\v8\Lib\Win64\
md output\v8\Inc\Blob\Win64
echo =====[ Copy V8 header ]=====
xcopy include output\v8\Inc\ /s/h/e/k/f/c
echo =====[ Copy To GitHub Env ]=====
D:
cd %GITHUB_WORKSPACE%
dir
xcopy C:\v8_build %GITHUB_WORKSPACE% /E /H /C /I /Q /Y
dir