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.
Этот коммит содержится в:
родитель
4ee7bf00e1
коммит
d5e11fa19b
1 изменённых файлов: 1 добавлений и 1 удалений
|
@ -82,7 +82,7 @@ func (c *Compiler) getGlobal(g *ssa.Global) llvm.Value {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Debug() {
|
if c.Debug() && !info.extern {
|
||||||
// Add debug info.
|
// Add debug info.
|
||||||
// TODO: this should be done for every global in the program, not just
|
// TODO: this should be done for every global in the program, not just
|
||||||
// the ones that are referenced from some code.
|
// the ones that are referenced from some code.
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче