fixed: broken WASI builds due to `_initialize`
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 14 Dec 2023 14:53:28 +0000 (08:53 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 14 Dec 2023 14:53:28 +0000 (08:53 -0600)
core/runtime/common.onyx

index 471b0a38fb98b7a80d033a78fb4a87f010db90dd..07fd0b1ac74a252a094de4867a4a78226769d569 100644 (file)
@@ -9,12 +9,14 @@ use runtime.platform { __output_string }
 // Every platform should define this, even if is it just '() {}'.
 #export "_start" platform.__start
 
-//
-// Export a common initialization procedure that should
-// always be invoked before using anything in Onyx.
-#export "_initialize" () {
-    __runtime_initialize();
-    context.thread_id = 0;    
+#if runtime != .Wasi {
+    //
+    // Export a common initialization procedure that should
+    // always be invoked before using anything in Onyx.
+    #export "_initialize" () {
+        __runtime_initialize();
+        context.thread_id = 0;    
+    }
 }
 
 #local