Bug 1890689 accumulate input in LargerReceiverBlockSizeThanDesiredBuffering GTest...
[gecko.git] / taskcluster / scripts / misc / build-custom-v8.sh
blob5c8ea673ad079b5cab3ecb21a770dd27eda068ca
1 #!/bin/bash
2 set -x -e -v
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 "'")
10 else
11 # First argument must be the artifact name
12 ARTIFACT_NAME="$1"
13 shift
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"
22 cd $GECKO_PATH
24 # Setup depot_tools
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
29 fetch --force v8
30 cd v8
32 # Build v8
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
37 cd ..
38 mkdir d8
40 cp -R v8/out/release d8
41 cp -R v8/include d8
42 chmod -R +x d8
44 tar caf $ARTIFACT_NAME d8
46 mkdir -p $UPLOAD_DIR
47 cp $ARTIFACT_NAME $UPLOAD_DIR