diff --git a/src/compiler/semantic_analyser.c b/src/compiler/semantic_analyser.c index cddbdcd5b..0abf1e60c 100644 --- a/src/compiler/semantic_analyser.c +++ b/src/compiler/semantic_analyser.c @@ -261,6 +261,8 @@ static void assign_panicfn(void) error_exit("Expected panic function to have the signature fn void(String, String, String, uint)."); } global_context.panic_var = decl; + decl->no_strip = true; + if (active_target.no_stdlib) return; const char *panicf = "std::core::builtin::panicf"; @@ -275,6 +277,8 @@ static void assign_panicfn(void) return; } + panicf_decl->no_strip = true; + Type *panicf_fn_type = panicf_decl->type->canonical; if (panicf_decl->decl_kind != DECL_FUNC) {