$ cat build.sh #!/bin/bash VER=$1 if [ -z $2 ];then NAME=$VER else NAME=$2 fi cd v8 git reset --hard $VER gclient sync -D gn gen out/x64_$NAME.release --args='v8_monolithic=true v8_use_external_startup_data=false is_component_build=false is_debug=false target_cpu="x64" use_goma=false goma_dir="None" v8_enable_backtrace=true v8_enable_disassembler=true v8_enable_object_print=true v8_enable_verify_heap=true' ninja -C out/x64_$NAME.release d8
以下是我运行一次该脚本的时间:
1 2 3 4 5 6 7 8
$ time ./build.sh "9.6.180.6" HEAD is now at 67eacd3dce Version 9.6.180.6 Syncing projects: 100% (29/29), done. Running hooks: 100% (27/27), done. Done. Made 178 targets from 98 files in 244ms ninja: Entering directory `out/x64_9.6.180.6.release' [1839/1839] LINK ./d8 ./build.sh "9.6.180.6" 4581.36s user 691.20s system 1586% cpu 5:32.41 total
help: @echo 'V8/D8 ${TAG} Docker image build file' @echo @echo 'Usage:' @echo ' make clean Delete dangling images and d8 images' @echo ' make build Build the d8 image using local Dockerfile' @echo ' make push Push an existing image to Docker Hub' @echo ' make deploy Clean, build and push image to Docker Hub' @echo ' make github Tag the project in GitHub' @echo