4 # This script is for building a custom version of V8
5 ARTIFACT_NAME
='d8.tar.zst'
6 CONFIG
='is_debug=false target_cpu="x64"'
7 if [[ $# -eq 0 ]]; then
8 echo "Using default configuration for v8 build."
9 CONFIG
=$
(echo $CONFIG |
tr -d "'")
11 # First argument must be the artifact name
15 # Use the rest of the arguments as the build config
16 CONFIG
=$
(echo $
* |
tr -d "'")
19 echo "Config: $CONFIG"
20 echo "Artifact name: $ARTIFACT_NAME"
25 git clone https
://chromium.googlesource.com
/chromium
/tools
/depot_tools.git
26 export PATH
=$PATH:$GECKO_PATH/depot_tools
28 # Get v8 source code and dependencies
33 gn gen out
/release
--args="$CONFIG"
34 ninja
-C out
/release d8
36 # Gather binary and related files into a zip, and upload it
40 cp -R v
8/out
/release d8
44 tar caf
$ARTIFACT_NAME d8
47 cp $ARTIFACT_NAME $UPLOAD_DIR