-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: -buildmode=c-shared with non-main package should fail rather than building an archive #15082
Comments
You need to use Let's change this issue to reporting an error rather than building something useless. |
Thank you, that fixed it. I agree that an error message would be helpful in this case. |
I will send a CL making -buildmode=c-shared match the others that require a single main package as the argument. I have no idea if that's correct. |
CL https://golang.org/cl/46421 mentions this issue. |
After https://golang.org/cl/46421 is landed. helpdoc.go should be updated that -buildmode=c-shared requires only one main package. Fixes #15082 Change-Id: I30a0ee956e6c4655c975ecdaa905887bd474952c Reviewed-on: https://go-review.googlesource.com/46810 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/46810 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
go version
)?Go 1.6, but tried with 1.5.3 to same result.
go env
)?(debian 8/jessie, amd64 on KVM)
Using the source file at https://github.com/jaseg/ffi/blob/9baa10bd4f5c780a7ae6816db48ea7e5b79a813b/stage24.go
Something along the lines of
as promised by
go help buildmode
.edit: Here is the output of
go build -x [...]
.Since I do not have any experience with go, this might very well be due to some oversight on my part. I would still be glad for any hints.
Thank you.
The text was updated successfully, but these errors were encountered: