diff options
author | Ayke van Laethem <[email protected]> | 2020-01-14 13:41:10 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-01-20 20:30:42 +0100 |
commit | d5e11fa19b6b4ef53f2c5106c1c1c6d8e50358b3 (patch) | |
tree | 9cea7f79d228f7e6e4d55b7100441efe55145774 /compiler | |
parent | 4ee7bf00e1fc5003699d3d04aaa5ee6e327446b2 (diff) | |
download | tinygo-d5e11fa19b6b4ef53f2c5106c1c1c6d8e50358b3.tar.gz tinygo-d5e11fa19b6b4ef53f2c5106c1c1c6d8e50358b3.zip |
compiler: do not emit debug info for extern globals
This results in a link error in the following commit (undefined
reference to runtime.trackedGlobalsBitmap from .debug_info). Solution:
don't emit debug info for declared but not defined symbols.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/symbol.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/symbol.go b/compiler/symbol.go index c5a4183f6..ae853f188 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. |