21 lines
872 B
Bash
Executable File
21 lines
872 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
source "${repo_root}/tools/web/native-build-env.sh"
|
|
|
|
command -v gcc-14 >/dev/null || { echo "missing gcc-14; install GCC 14" >&2; exit 1; }
|
|
command -v g++-14 >/dev/null || { echo "missing g++-14; install G++ 14" >&2; exit 1; }
|
|
command -v cmake >/dev/null || { echo "missing cmake" >&2; exit 1; }
|
|
command -v ninja >/dev/null || { echo "missing ninja" >&2; exit 1; }
|
|
|
|
if [[ ! -x "${repo_root}/.emsdk/upstream/emscripten/emcc" ]]; then
|
|
echo "Emscripten 3.1.69 is not installed in ${repo_root}/.emsdk" >&2
|
|
echo "Run: ${repo_root}/tools/web/prepare-emscripten.sh" >&2
|
|
exit 2
|
|
fi
|
|
|
|
source "${repo_root}/tools/web/emscripten-env.sh"
|
|
emcc --version | head -1
|
|
printf 'build-env-ready native=%s wasm=%s\n' "$(${CC:-gcc-14} --version | head -1)" "$(emcc --version | head -1)"
|