Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Static linking in 0.1.0 #328

@metral

Description

@metral

Is this command:

GOPATH=/path/to/gb/project/vendor:/path/to/gb/project CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w -extld ld -extldflags -static' -a -x .

listed in #81 (comment) still the recommended way of building static bins as far as gb is concerned?

I primarily ask because i see that with the cross-compilation support in 0.1.0, builds for other architectures are statically linked, so I can only assume gb is handling static linking to some extent and was wondering if that functionality is going to be added to the native host gb builds (i.e. my host is GOOS=linux GOARCH=amd64 but gb build only allows me to create dynamically linked bins)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions