bugfix: misordered if-not-defined
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sat, 13 May 2023 20:10:07 +0000 (15:10 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sat, 13 May 2023 20:10:07 +0000 (15:10 -0500)
core/builtin.onyx

index 6e9ae87d71cc6741d20411bc2d9e8f7dcbdade18..c75adcee6c5fb69a10e65904c89e6676f1f88f6a 100644 (file)
@@ -540,18 +540,16 @@ Link_Options :: struct {
         IMPORT_MEMORY_DEFAULT :: true;
         IMPORT_MEMORY_MODULE_NAME_DEFAULT :: "onyx";
         IMPORT_MEMORY_IMPORT_NAME_DEFAULT :: "memory";
-    }
-
-    #if runtime.runtime == .Wasi && runtime.Multi_Threading_Enabled {
-        IMPORT_MEMORY_DEFAULT :: true;
-        IMPORT_MEMORY_MODULE_NAME_DEFAULT :: "env";
-        IMPORT_MEMORY_IMPORT_NAME_DEFAULT :: "memory";
-    }
-
-    #if !#defined(IMPORT_MEMORY_DEFAULT) {
-        IMPORT_MEMORY_DEFAULT :: false;
-        IMPORT_MEMORY_MODULE_NAME_DEFAULT :: "";
-        IMPORT_MEMORY_IMPORT_NAME_DEFAULT :: "";
+    } else {
+        #if runtime.runtime == .Wasi && runtime.Multi_Threading_Enabled {
+            IMPORT_MEMORY_DEFAULT :: true;
+            IMPORT_MEMORY_MODULE_NAME_DEFAULT :: "env";
+            IMPORT_MEMORY_IMPORT_NAME_DEFAULT :: "memory";
+        } else {
+            IMPORT_MEMORY_DEFAULT :: false;
+            IMPORT_MEMORY_MODULE_NAME_DEFAULT :: "";
+            IMPORT_MEMORY_IMPORT_NAME_DEFAULT :: "";
+        }
     }
 }