compiler: Don't externally link runtime.init

There is no reason to make this exception.
Этот коммит содержится в:
Ayke van Laethem 2018-04-27 16:19:29 +02:00
родитель 3a4663150e
коммит e895372918

2
tgo.go
Просмотреть файл

@ -453,7 +453,7 @@ func (c *Compiler) parseFuncDecl(f *ssa.Function) (*Frame, error) {
} }
func (c *Compiler) parseFunc(frame *Frame, f *ssa.Function) error { func (c *Compiler) parseFunc(frame *Frame, f *ssa.Function) error {
if frame.llvmFn.Name() != "main.main" && frame.llvmFn.Name() != "runtime.init" { if frame.llvmFn.Name() != "main.main" {
// This function is only used from within Go. // This function is only used from within Go.
frame.llvmFn.SetLinkage(llvm.PrivateLinkage) frame.llvmFn.SetLinkage(llvm.PrivateLinkage)
} }