But I can use -buildmod=plugin to generate a "ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked", and it can be used. I want to konw if it's the only way to generate a binary package and the builmode=archive/shared not work anymore.
在 2019年8月28日星期三 UTC+8下午10:36:31,Ian Lance Taylor写道: > > On Wed, Aug 28, 2019 at 5:53 AM <w1252...@gmail.com <javascript:>> wrote: > > > > As we know, Go 1.13 will drop support for binary-only packages. it seems > we have to use buildmode=plugin/archive if we want to build go archive to > provide to others. > > > > when I try go buildmode=archive or buildmode=shared(go 1.12, go module > project), it throw error like cannot use packages ... from different roots, > i want to ask if i do something wrong, or it can't support well with 1.12? > > Using -buildmode=archive or -buildmode=shared isn't a way to step > around the restrictions on binary packages. Now that support for > binary packages has been removed, the "go build" process inherently > expects to be able to see the source code of a package. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2527561f-96ea-41f0-bf4c-18b409250cec%40googlegroups.com.