From 856b83ee6851199c35ecbe176ce9cb2308571abb Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 13 May 2023 15:10:07 -0500 Subject: [PATCH] bugfix: misordered if-not-defined --- core/builtin.onyx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/core/builtin.onyx b/core/builtin.onyx index 6e9ae87d..c75adcee 100644 --- a/core/builtin.onyx +++ b/core/builtin.onyx @@ -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 :: ""; + } } } -- 2.25.1