From 8f4e4e811f1806187ee7d477d54ccdc3a49f091b Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sun, 6 Nov 2022 21:41:09 +0100 Subject: [PATCH] Wasm: don't emit wasm-runtime.js file in WASI mode --- core/src/main/java/org/teavm/backend/wasm/WasmTarget.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java b/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java index 1eed35199..31e498624 100644 --- a/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java +++ b/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java @@ -551,7 +551,9 @@ public class WasmTarget implements TeaVMTarget, TeaVMWasmHost { emitC(module, buildTarget, getBaseName(outputName) + ".wasm.c"); } - emitRuntime(buildTarget, getBaseName(outputName) + ".wasm-runtime.js"); + if (runtimeType == WasmRuntimeType.TEAVM) { + emitRuntime(buildTarget, getBaseName(outputName) + ".wasm-runtime.js"); + } } private WasmFunction createStartFunction(NameProvider names) {