Rebuild local Blender WASM environment and recovery evidence
This commit is contained in:
@@ -4,6 +4,18 @@ set -euo pipefail
|
||||
WEB_EMSCRIPTEN_VERSION="3.1.69"
|
||||
web_workspace_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
|
||||
# Prefer the repository-local SDK prepared by tools/web/prepare-build-env.sh.
|
||||
if [[ -x "${web_workspace_root}/.emsdk/upstream/emscripten/emcc" ]]; then
|
||||
export EMSDK="${web_workspace_root}/.emsdk"
|
||||
export PATH="${EMSDK}/upstream/emscripten:${EMSDK}/node/24.19.0_64bit/bin:${EMSDK}:${PATH}"
|
||||
# Override copied-host settings in .emscripten-web with this checkout's SDK.
|
||||
export EM_LLVM_ROOT="${EM_LLVM_ROOT-${EMSDK}/upstream/bin}"
|
||||
export EM_BINARYEN_ROOT="${EM_BINARYEN_ROOT-${EMSDK}/upstream}"
|
||||
export EM_NODE_JS="${EM_NODE_JS-${EMSDK}/node/24.19.0_64bit/bin/node}"
|
||||
export EM_LLVM_ADD_VERSION="${EM_LLVM_ADD_VERSION-}"
|
||||
export EM_CLANG_ADD_VERSION="${EM_CLANG_ADD_VERSION-}"
|
||||
fi
|
||||
|
||||
if command -v emcc >/dev/null 2>&1; then
|
||||
detected_version="$(emcc --version | awk '{for (i = 1; i <= NF; i++) if ($i ~ /^[0-9]+\.[0-9]+\.[0-9]+$/) {print $i; exit}}')"
|
||||
if [[ "${detected_version}" != "${WEB_EMSCRIPTEN_VERSION}" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user