From 4271eb477c65ce280f9bb5e7d6cc8bca395a57b5 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 23 May 2020 14:04:02 +0300 Subject: [PATCH] cgen: disable C static fn attribute with -cg (improves backtraces) --- vlib/v/gen/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/fn.v b/vlib/v/gen/fn.v index a80e34d059..d686c08900 100644 --- a/vlib/v/gen/fn.v +++ b/vlib/v/gen/fn.v @@ -106,7 +106,7 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl) { g.write('$type_name ${impl_fn_name}(') } } else { - if !it.is_pub { + if !(it.is_pub || g.pref.is_debug) { g.write('static ') g.definitions.write('static ') }