Files
wehub-resource-sync 770d92cb1f
Lint / lint (push) Has been cancelled
Build Docs / Deploy Docs (push) Has been cancelled
Windows CI / Windows (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:23:58 +08:00

27 lines
650 B
Bash
Executable File

#!/bin/bash
# This file prepares all the necessary dependencies for the web build.
set -euxo pipefail
emcc --version
npm --version
TVM_SOURCE_DIR_SET="${TVM_SOURCE_DIR:-}"
git submodule update --init --recursive
CURR_DIR=`pwd`
if [[ -z "${TVM_SOURCE_DIR_SET}" ]]; then
echo "Do not find TVM_SOURCE_DIR env variable, use 3rdparty/tvm".
echo "Make sure you set TVM_SOURCE_DIR in your env variable to use emcc build correctly"
export TVM_SOURCE_DIR="${TVM_SOURCE_DIR:-${CURR_DIR}/3rdparty/tvm}"
fi
# Build mlc_wasm_runtime
cd web && make
cd -
# Build tvm's web runtime
cd ${TVM_SOURCE_DIR}/web && TVM_HOME=${TVM_SOURCE_DIR} make
cd -