From f46f15e10cc8e266a90ff90e5feb1cd5f9f12e97 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Mon, 27 Jul 2026 09:23:26 +0700 Subject: [PATCH] update --- web/script/build-wasm.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/script/build-wasm.sh b/web/script/build-wasm.sh index 7ef3e53..3775664 100755 --- a/web/script/build-wasm.sh +++ b/web/script/build-wasm.sh @@ -20,6 +20,16 @@ if [[ "$1" == "--release" ]]; then echo -e "${YELLOW}Building in release mode${NC}" fi +# macOS: ensure LLVM from Homebrew is available +if [[ "$(uname)" == "Darwin" ]]; then + echo -e "${GREEN}Detected macOS, setting up LLVM...${NC}" + brew install llvm + LLVM_PATH=$(brew --prefix llvm) + export AR="${LLVM_PATH}/bin/llvm-ar" + export CC="${LLVM_PATH}/bin/clang" + echo -e "${GREEN}LLVM path: ${LLVM_PATH}${NC}" +fi + # Step 1: Build WASM echo -e "${GREEN}Step 1: Building WASM...${NC}" cd "$PROJECT_ROOT"