add v8 snapshot in build processes

This commit is contained in:
Pierre Tachoire
2026-01-07 17:14:15 +01:00
parent e642c85ebd
commit d5f4ca15cc
3 changed files with 34 additions and 8 deletions

View File

@@ -47,12 +47,18 @@ help:
# $(ZIG) commands
# ------------
.PHONY: build build-dev run run-release shell test bench wpt data end2end
.PHONY: build build-v8-snapshot build-dev run run-release shell test bench wpt data end2end
## Build v8 snapshot
build-v8-snapshot:
@printf "\033[36mBuilding v8 snapshot (release safe)...\033[0m\n"
@$(ZIG) build -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)
@printf "\033[33mBuild OK\033[0m\n"
## Build in release-fast mode
build:
build: build-v8-snapshot
@printf "\033[36mBuilding (release safe)...\033[0m\n"
@$(ZIG) build -Doptimize=ReleaseFast -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)
@$(ZIG) build -Doptimize=ReleaseFast -Dsnapshot_path=../../snapshot.bin -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\033[33mBuild ERROR\033[0m\n"; exit 1;)
@printf "\033[33mBuild OK\033[0m\n"
## Build in debug mode