go build vs go install in cgo

249 views
Skip to first unread message

Nitish Saboo

unread,
Jun 28, 2019, 11:53:31 AM6/28/19
to golang-nuts
HI ,

In case of cgo, does go build -v -x main.go and go install -v -x main.go perform the same operation except that go install pushes the binary under /bin.
Is the binary that gets created is same ?

Thanks,
Nitish

Ian Lance Taylor

unread,
Jun 28, 2019, 3:34:42 PM6/28/19
to Nitish Saboo, golang-nuts
On Fri, Jun 28, 2019 at 8:53 AM Nitish Saboo <nitish....@gmail.com> wrote:
>
> In case of cgo, does go build -v -x main.go and go install -v -x main.go perform the same operation except that go install pushes the binary under /bin.
> Is the binary that gets created is same ?

Yes.

Ian
Reply all
Reply to author
Forward
0 new messages