From 90d6c93a4defaf010610811b781a6c6e9abb8ac3 Mon Sep 17 00:00:00 2001 From: Abdelrahman Ashraf Date: Thu, 12 Dec 2024 21:23:22 +0700 Subject: [PATCH] refactor: update Makefile to fix wasm build on ubuntu --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bd535ba5..40bac75d 100644 --- a/Makefile +++ b/Makefile @@ -381,8 +381,10 @@ endef define CARGO_BUILD if [ "$(CARGO_TARGET)" = "wasm32-unknown-emscripten" ]; then \ - . $(EMSDK_DIR)/$(EMSDK)_env.sh && \ - RUSTFLAGS="-Zlocation-detail=none" cargo +nightly build \ + cd $(EMSDK_DIR) && \ + . ./emsdk_env.sh && \ + cd $(PROJECT_DIR) && \ + RUSTFLAGS="-Zlocation-detail=none" cargo +nightly build \ -Z build-std=std,panic_abort \ -Z build-std-features="panic_immediate_abort,optimize_for_size" \ --manifest-path $(PROJECT_DIR)/Cargo.toml \