compiler: Don't externally link runtime.init

There is no reason to make this exception.
This commit is contained in:
Ayke van Laethem
2018-04-27 16:19:29 +02:00
parent 3a4663150e
commit e895372918
+1 -1
View File
@@ -453,7 +453,7 @@ func (c *Compiler) parseFuncDecl(f *ssa.Function) (*Frame, 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.
frame.llvmFn.SetLinkage(llvm.PrivateLinkage)
}