Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: NumGoroutine is 2 in main when using -linkshared #16631
Please answer these questions before submitting your issue. Thanks!
go version devel +219ca60 Sat Aug 6 19:30:57 2016 +0000 linux/amd64
go run run.go -linkshared goprint.go
no output but the process exiting cleanly
Ah so the good news is that this is because the test is a bit silly (in a way that it is not in 1.6). And this is the real 'problem':
This difference is present in 1.6 so not a regression. I'll either try to figure out what's going on or just fix the test in early 1.8.
@mwhudson, I probably just don't know what I'm doing here, but when I tried to reproduce this I get:
$ go run -linkshared main.go # command-line-arguments /home/austin/go.dev/pkg/tool/linux_amd64/link: cannot implicitly include runtime/cgo in a shared library