From 343c731367f3bba639e6893f69bd127d8dda3b0b Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Tue, 1 Oct 2024 18:54:39 +0000
Subject: [PATCH] rts: fix conflicting StgRun definitions on wasm

This commit fixes conflicting StgRun definition when building dynamic
ways of RTS for wasm in unregisterised mode.

(cherry picked from commit bef94bde53f07a1b0d7eb16d3d0eb1bd62f5f992)
(cherry picked from commit 6f8442969d36627af841128db48c449ec1865deb)
(cherry picked from commit e7806b121178124a02fee005b6399aec247e0085)
---
 rts/wasm/StgRun.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rts/wasm/StgRun.c b/rts/wasm/StgRun.c
index b3442a92424..4a62dfbc425 100644
--- a/rts/wasm/StgRun.c
+++ b/rts/wasm/StgRun.c
@@ -1,5 +1,7 @@
 #include "Rts.h"
 
+#if !defined(USE_MINIINTERPRETER)
+
 // We directly return the same BaseReg as passed to StgRun. This is
 // fine on wasm which doesn't have SMP.
 //
@@ -19,3 +21,5 @@ StgFunPtr StgReturn(void)
 {
     return 0;
 }
+
+#endif
-- 
GitLab