-
Notifications
You must be signed in to change notification settings - Fork 51
/
windows_32.cmd
103 lines (82 loc) · 3.77 KB
/
windows_32.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
set VERSION=%1
set NEW_WRAP=%2
cd /d %USERPROFILE%
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
call gclient
cd depot_tools
call git reset --hard 8d16d4a
cd ..
set DEPOT_TOOLS_UPDATE=0
mkdir v8
cd v8
echo =====[ Fetching V8 ]=====
call fetch v8
cd v8
call git checkout refs/tags/%VERSION%
@REM cd test\test262\data
call git config --system core.longpaths true
@REM call git restore *
@REM cd ..\..\..\
call gclient sync
if "%VERSION%"=="10.6.194" (
echo =====[ patch 10.6.194 ]=====
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\win_msvc_v10.6.194.patch
)
if "%VERSION%"=="11.8.172" (
echo =====[ patch 10.6.194 ]=====
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\remove_uchar_include_v11.8.172.patch
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\win_dll_v11.8.172.patch"
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\enable_wee8_v11.8.172.patch
)
if "%VERSION%"=="9.4.146.24" (
echo =====[ patch jinja for python3.10+ ]=====
cd third_party\jinja2
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\jinja_v9.4.146.24.patch
cd ..\..
)
set "CXX_SETTING=is_clang=false use_custom_libcxx=false"
if "%NEW_WRAP%"=="with_new_wrap" (
echo =====[ wrap new delete ]=====
set "CXX_SETTING=is_clang=true use_custom_libcxx=true"
)
if "%VERSION%"=="9.4.146.24" (
set "CXX_SETTING=is_clang=false"
)
@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 -- .
@REM issue #4
if "%VERSION%"=="9.4.146.24" (
if not "%NEW_WRAP%"=="with_new_wrap" (
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\intrin.patch
)
)
echo =====[ add ArrayBuffer_New_Without_Stl ]=====
node %~dp0\node-script\add_arraybuffer_new_without_stl.js . %VERSION% %NEW_WRAP%
node %~dp0\node-script\patchs.js . %VERSION% %NEW_WRAP%
echo =====[ Building V8 ]=====
if "%VERSION%"=="11.8.172" (
call gn gen out.gn\x86.release -args="target_os=""win"" target_cpu=""x86"" v8_use_external_startup_data=false v8_enable_i18n_support=false is_debug=false v8_static_library=true %CXX_SETTING% strip_debug_info=true symbol_level=0 v8_enable_pointer_compression=false v8_enable_sandbox=false v8_enable_maglev=false v8_enable_webassembly=false v8_enable_system_instrumentation=false"
)
if "%VERSION%"=="10.6.194" (
call gn gen out.gn\x86.release -args="target_os=""win"" target_cpu=""x86"" v8_use_external_startup_data=false v8_enable_i18n_support=false is_debug=false v8_static_library=true %CXX_SETTING% strip_debug_info=true symbol_level=0 v8_enable_pointer_compression=false v8_enable_sandbox=false v8_enable_system_instrumentation=false"
)
if "%VERSION%"=="9.4.146.24" (
call gn gen out.gn\x86.release -args="target_os=""win"" target_cpu=""x86"" v8_use_external_startup_data=false v8_enable_i18n_support=false is_debug=false v8_static_library=true %CXX_SETTING% strip_debug_info=true symbol_level=0 v8_enable_pointer_compression=false v8_enable_system_instrumentation=false"
)
call ninja -C out.gn\x86.release -t clean
call ninja -v -C out.gn\x86.release wee8
md output\v8\Lib\Win32
if "%NEW_WRAP%"=="with_new_wrap" (
call %~dp0\rename_symbols_win.cmd x86 output\v8\Lib\Win32\
)
copy /Y out.gn\x86.release\obj\wee8.lib output\v8\Lib\Win32\
md output\v8\Bin\Win32
copy /Y out.gn\x86.release\v8cc.exe output\v8\Bin\Win32\
copy /Y out.gn\x86.release\mksnapshot.exe output\v8\Bin\Win32\