Files
workinf_Blender_Wasm/tools/web/build-web-engine-variants.sh
mes123456 6090995999
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
perf(web): reuse incremental build and status caches
2026-09-06 10:27:26 +08:00

30 lines
924 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
source "${repo_root}/tools/web/emscripten-env.sh"
configure_variant() {
local name="$1"
local threads="$2"
local build_dir="${repo_root}/build_web-${name}"
local configure_args=(
-S "${repo_root}/web/engine"
-B "${build_dir}"
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DWEB_ENGINE_THREADS="${threads}"
)
if [[ "${WEB_ENGINE_FORCE_RECONFIGURE:-0}" == "1" ]]; then
configure_args=(--fresh "${configure_args[@]}")
fi
emcmake cmake "${configure_args[@]}"
cmake --build "${build_dir}" --target web_engine --parallel "${WEB_BUILD_JOBS:-$(bash "${repo_root}/tools/web/compute-build-jobs.sh")}"
test -s "${build_dir}/web_engine.js"
test -s "${build_dir}/web_engine.wasm"
printf '%s variant ok: %s\n' "${name}" "${build_dir}"
}
configure_variant single OFF
configure_variant pthread ON