diff --git a/compiler/symbol.go b/compiler/symbol.go index c5a4183f..ae853f18 100644 --- a/compiler/symbol.go +++ b/compiler/symbol.go @@ -82,7 +82,7 @@ func (c *Compiler) getGlobal(g *ssa.Global) llvm.Value { } } - if c.Debug() { + if c.Debug() && !info.extern { // Add debug info. // TODO: this should be done for every global in the program, not just // the ones that are referenced from some code.