diff --git a/Makefile b/Makefile index 40bac75d..f1a3d5bb 100644 --- a/Makefile +++ b/Makefile @@ -381,9 +381,7 @@ endef define CARGO_BUILD if [ "$(CARGO_TARGET)" = "wasm32-unknown-emscripten" ]; then \ - cd $(EMSDK_DIR) && \ - . ./emsdk_env.sh && \ - cd $(PROJECT_DIR) && \ + . $(EMSDK_DIR)/$(EMSDK)_env.sh && \ RUSTFLAGS="-Zlocation-detail=none" cargo +nightly build \ -Z build-std=std,panic_abort \ -Z build-std-features="panic_immediate_abort,optimize_for_size" \