.PHONY: v8 all ARCH := $(shell uname -m) ifeq ($(ARCH),aarch64) ARCH := arm64 endif ifeq ($(ARCH),x86_64) ARCH := x64 endif GN_ARGS = is_component_build=false v8_use_external_startup_data=false v8_enable_i18n_support=false is_clang=false use_gold=false use_custom_libcxx=false treat_warnings_as_errors=false v8_monolithic=true build/gn/out/gn: @echo "Setting up build directory" @mkdir -p build @echo "Downloading gn source" @mkdir -p build/gn && cd build/gn && git clone -q https://gn.googlesource.com/gn.git . && git checkout -q eea3906f0e2a8d3622080127d2005ff214d51383 @echo "Building gn" @cd build/gn && python3 build/gen.py --no-static-libstdc++ && ninja -C out/ gn build/v8: build/gn/out/gn @echo "Downloading v8 source" @git clone -q https://github.com/v8/v8 --branch 9.7.37 --single-branch --depth 1 build/v8 @echo "Patching v8 code" @cd build/v8 && (git apply ../../patches/code/*.patch || true) @echo "Downloading up third party sources" @mkdir -p build/v8/base/trace_event/common @cd build/v8/base/trace_event/common && git init -q . @cd build/v8/base/trace_event/common && git remote add origin https://chromium.googlesource.com/chromium/src/base/trace_event/common.git @cd build/v8/base/trace_event/common && git fetch -q --depth 1 origin 3da1e2fcf66acd5c7194497b4285ac163f32e239 @cd build/v8/base/trace_event/common && git reset -q --hard 3da1e2fcf66acd5c7194497b4285ac163f32e239 @mkdir -p build/v8/build @cd build/v8/build && git init -q . @cd build/v8/build && git remote add origin https://chromium.googlesource.com/chromium/src/build.git @cd build/v8/build && git fetch -q --depth 1 origin bbf7f0ed65548c4df862d2a2748e3a9b908a3217 @cd build/v8/build && git reset -q --hard bbf7f0ed65548c4df862d2a2748e3a9b908a3217 @mkdir -p build/v8/third_party/googletest/src @cd build/v8/third_party/googletest/src && git init -q . @cd build/v8/third_party/googletest/src && git remote add origin https://chromium.googlesource.com/external/github.com/google/googletest.git @cd build/v8/third_party/googletest/src && git fetch -q --depth 1 origin 47f819c3ca54fb602f432904443e00a0a1fe2f42 @cd build/v8/third_party/googletest/src && git reset -q --hard 47f819c3ca54fb602f432904443e00a0a1fe2f42 @mkdir -p build/v8/third_party/icu @cd build/v8/third_party/icu && git init -q . @cd build/v8/third_party/icu && git remote add origin https://chromium.googlesource.com/chromium/deps/icu.git @cd build/v8/third_party/icu && git fetch -q --depth 1 origin 75e34bcccea0be165c31fdb278b3712c516c5876 @cd build/v8/third_party/icu && git reset -q --hard 75e34bcccea0be165c31fdb278b3712c516c5876 @mkdir -p build/v8/third_party/jinja2 @cd build/v8/third_party/jinja2 && git init -q . @cd build/v8/third_party/jinja2 && git remote add origin https://chromium.googlesource.com/chromium/src/third_party/jinja2.git @cd build/v8/third_party/jinja2 && git fetch -q --depth 1 origin ee69aa00ee8536f61db6a451f3858745cf587de6 @cd build/v8/third_party/jinja2 && git reset -q --hard ee69aa00ee8536f61db6a451f3858745cf587de6 @mkdir -p build/v8/third_party/markupsafe @cd build/v8/third_party/markupsafe && git init -q . @cd build/v8/third_party/markupsafe && git remote add origin https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git @cd build/v8/third_party/markupsafe && git fetch -q --depth 1 origin 1b882ef6372b58bfd55a3285f37ed801be9137cd @cd build/v8/third_party/markupsafe && git reset -q --hard 1b882ef6372b58bfd55a3285f37ed801be9137cd @mkdir -p build/v8/third_party/zlib @cd build/v8/third_party/zlib && git init -q . @cd build/v8/third_party/zlib && git remote add origin https://chromium.googlesource.com/chromium/src/third_party/zlib.git @cd build/v8/third_party/zlib && git fetch -q --depth 1 origin 563140dd9c24f84bf40919196e9e7666d351cc0d @cd build/v8/third_party/zlib && git reset -q --hard 563140dd9c24f84bf40919196e9e7666d351cc0d @cp Makefiles/gclient_args.gni build/v8/build/config/gclient_args.gni @echo "Patching sysroot scripts" @cd build/v8/build && (git apply ../../../patches/sysroot/*.patch || true) @echo "Setting up sysroot" @cd build/v8 && python3 build/linux/sysroot_scripts/install-sysroot.py --arch=$(ARCH) @echo "Generating v8 configuration" @cd build/v8 && ../gn/out/gn gen out.gn --args="$(GN_ARGS)" @echo "Patching v8 build configuration" @cd build/v8 && (git apply ../../patches/build/*.patch || true) @echo "Building v8" @cd build/v8 && ninja -C ./out.gn v8_monolith libv8_monolith.a: build/v8 v8: libv8_monolith.a all: v8