From 17662e296cf4f821dbddf5ae846aacbcea96e4c9 Mon Sep 17 00:00:00 2001 From: "kalle (jag)" Date: Mon, 10 Aug 2026 00:46:00 +0200 Subject: [PATCH 1/4] Add `-source-code-locations:none` to Odin builds --- src/langs.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/langs.rs b/src/langs.rs index c11b4b9..db12127 100644 --- a/src/langs.rs +++ b/src/langs.rs @@ -392,6 +392,7 @@ fn build_odin(config: &Config) -> anyhow::Result<()> { ".", "-target:freestanding_wasm32", "-out:firefly.wasm", + "-source-code-locations:none", ]; if let Some(additional_args) = &config.compile_args { for arg in additional_args { From 61c13e1eff887d30e7007dc6cac25650dc48d11f Mon Sep 17 00:00:00 2001 From: "kalle (jag)" Date: Mon, 10 Aug 2026 00:47:06 +0200 Subject: [PATCH 2/4] Disable asserts in Odin --- src/langs.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/langs.rs b/src/langs.rs index db12127..705794f 100644 --- a/src/langs.rs +++ b/src/langs.rs @@ -393,6 +393,7 @@ fn build_odin(config: &Config) -> anyhow::Result<()> { "-target:freestanding_wasm32", "-out:firefly.wasm", "-source-code-locations:none", + "-disable-assert", ]; if let Some(additional_args) = &config.compile_args { for arg in additional_args { From 53b521ed58354cc58591c21a5cebeb8e6d3e2322 Mon Sep 17 00:00:00 2001 From: "kalle (jag)" Date: Mon, 10 Aug 2026 00:54:20 +0200 Subject: [PATCH 3/4] Only set `-disable-assert` when not `--no-strip` --- src/langs.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/langs.rs b/src/langs.rs index 705794f..a382aff 100644 --- a/src/langs.rs +++ b/src/langs.rs @@ -29,7 +29,7 @@ pub fn build_bin(config: &Config, args: &BuildArgs) -> anyhow::Result<()> { Lang::Go => build_go(config), Lang::Lua => build_lua(config), Lang::Moon => build_moon(config), - Lang::Odin => build_odin(config), + Lang::Odin => build_odin(config, args), Lang::Python => build_python(config), Lang::Rust => build_rust(config), Lang::TS => build_ts(config), @@ -377,7 +377,7 @@ fn build_zig(config: &Config) -> anyhow::Result<()> { } // Build Odin project. -fn build_odin(config: &Config) -> anyhow::Result<()> { +fn build_odin(config: &Config, args: &BuildArgs) -> anyhow::Result<()> { check_installed("Odin", "odin", "version")?; // Find wasi-sdk and add it into $PATH. @@ -393,8 +393,10 @@ fn build_odin(config: &Config) -> anyhow::Result<()> { "-target:freestanding_wasm32", "-out:firefly.wasm", "-source-code-locations:none", - "-disable-assert", ]; + if !args.no_strip { + cmd_args.push("-disable-assert"); + } if let Some(additional_args) = &config.compile_args { for arg in additional_args { cmd_args.push(arg.as_str()); From 62114b23855b16391a68e3839fdea1c514b15d0f Mon Sep 17 00:00:00 2001 From: "kalle (jag)" Date: Mon, 10 Aug 2026 12:04:30 +0200 Subject: [PATCH 4/4] don't disable asserts --- src/langs.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/langs.rs b/src/langs.rs index a382aff..db12127 100644 --- a/src/langs.rs +++ b/src/langs.rs @@ -29,7 +29,7 @@ pub fn build_bin(config: &Config, args: &BuildArgs) -> anyhow::Result<()> { Lang::Go => build_go(config), Lang::Lua => build_lua(config), Lang::Moon => build_moon(config), - Lang::Odin => build_odin(config, args), + Lang::Odin => build_odin(config), Lang::Python => build_python(config), Lang::Rust => build_rust(config), Lang::TS => build_ts(config), @@ -377,7 +377,7 @@ fn build_zig(config: &Config) -> anyhow::Result<()> { } // Build Odin project. -fn build_odin(config: &Config, args: &BuildArgs) -> anyhow::Result<()> { +fn build_odin(config: &Config) -> anyhow::Result<()> { check_installed("Odin", "odin", "version")?; // Find wasi-sdk and add it into $PATH. @@ -394,9 +394,6 @@ fn build_odin(config: &Config, args: &BuildArgs) -> anyhow::Result<()> { "-out:firefly.wasm", "-source-code-locations:none", ]; - if !args.no_strip { - cmd_args.push("-disable-assert"); - } if let Some(additional_args) = &config.compile_args { for arg in additional_args { cmd_args.push(arg.as_str());