News for hackers. Stuff that matters.
Re:Mid-stack inlining in the Go compiler by koenigdavidmj on Monday March 06, 2017 @12:23PM (#13804221)
Go statically links to all Go libraries, and only dynamically links when interfacing with C code. (As of the last time I used it, a couple years ago; this may have changed since then.)
Re:Mid-stack inlining in the Go compiler by spullara on Monday March 06, 2017 @12:28PM (#13804254)
That doesn't really answer whether it can inline library functions. The fact that it statically links means it potentially could inline methods it finds in them but I don't think that it does currently since it appears that this inline functionality works when compiling source.
Re:Mid-stack inlining in the Go compiler by ekiru on Monday March 06, 2017 @03:37PM (#13805872)
It can inline library functions, since, at latest, 1.4.2 (this is just what I happened to have handy on this computer). It's pretty easy to test by writing a package containing a simple function like "func Square(x int) int { return x * x }", compiling a main package that imports that package and calls Square, and then disassembling the executable to see whether it calls Square or inlines it.
Re:Mid-stack inlining in the Go compiler by pjmlp on Monday March 06, 2017 @01:20PM (#13804731)
Go nowadays supports dynamic linking, just plugins aren't 100% supported across all targets.