-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathv8_task.cmd
79 lines (65 loc) · 2.58 KB
/
v8_task.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
set PATH=%~1;%PATH%
set INCLUDE=%~2;%INCLUDE%
set libv8platform=%~3
set libv8configuration=%~4
set libv8version=%~5
set libv8static=%~6
set libv8BuildWithMSVSVersion=%~7
echo PATH=%PATH%
echo INCLUDE=%INCLUDE%
echo %libv8platform%
echo %libv8configuration%
echo %libv8version%
echo static = %libv8static%
echo libv8BuildWithMSVSVersion=%libv8BuildWithMSVSVersion%
if "%libv8configuration%" == "debug" (
set arguments=-- is_debug=true
) else (
set arguments=-- is_debug=false
)
if "%libv8static%" == "true" (
set arguments=%arguments% is_component_build=false v8_static_library=true
set static=.static
) else (
set arguments=%arguments% is_component_build=true
set static=
)
REM if "%libv8platform%" == "x64" (
REM set arguments=%arguments% target_cpu=amd64
REM ) else (
REM set arguments=%arguments% target_cpu=x86
REM )
set arguments=%arguments% use_jumbo_build=true enable_nacl=false remove_webcore_debug_symbols=true
set arguments=%arguments% v8_enable_i18n_support=false v8_use_external_startup_data=false
echo %arguments%
If Not Exist "depot_tools.zip" (
call powershell -command "& { iwr https://storage.googleapis.com/chrome-infra/depot_tools.zip -OutFile depot_tools.zip }"
)
If Not Exist "depot_tools" (
call powershell -command "& { Add-Type -AssemblyName System.IO.Compression.FileSystem; function Unzip { param([string]$zipfile, [string]$outpath); [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)}; Unzip "depot_tools.zip" "depot_tools" }"
)
echo Use default GYP_MSVS_VERSION when fetching V8 because master's default settings may not support our version
echo Current GYP_MSVS_VERSION=%GYP_MSVS_VERSION%
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set PATH=%CD%\depot_tools;%PATH%
If Exist "v8" (
cd v8
) else (
REM From a cmd.exe shell, run the command gclient (without arguments).
REM On first run, gclient will install all the Windows-specific bits
REM needed to work with the code, including msysgit and python.
call gclient
call fetch v8 2^>nul
cd v8
echo call git checkout %libv8version%
call git checkout %libv8version%
echo Set GYP_MSVS_VERSION to %libv8BuildWithMSVSVersion%
set GYP_MSVS_VERSION=%libv8BuildWithMSVSVersion%
echo Current GYP_MSVS_VERSION=%GYP_MSVS_VERSION% after checkout
call gclient sync
)
If Not Exist "out.gn/%libv8platform%.%libv8configuration%%static%" (
call python tools/dev/v8gen.py gen -vv -b %libv8platform%.%libv8configuration% %libv8platform%.%libv8configuration%%static% %arguments%
call ninja -C out.gn/%libv8platform%.%libv8configuration%%static% d8
)
exit 0