Bug 225812 - Mk/Uses/go.mk: Add GO_BUILDFLAGS variable
Summary: Mk/Uses/go.mk: Add GO_BUILDFLAGS variable
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Julien Laffaye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-10 21:30 UTC by David O'Rourke
Modified: 2018-08-25 17:29 UTC (History)
2 users (show)

See Also:


Attachments
go.mk GO_BUILDFLAGS diff (885 bytes, patch)
2018-02-10 21:30 UTC, David O'Rourke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David O'Rourke 2018-02-10 21:30:41 UTC
Created attachment 190491 [details]
go.mk GO_BUILDFLAGS diff

This diff adds a `GO_BUILDFLAGS` variable to `Mk/Uses/go.mk` for passing additional build flags (go help build) to the `go install` command.

I'm proposing this change since while working on Prometheus and its exporters, I've found myself copying the default Go `do-build` to enable passing of extra `-ldflags` to `go install`. Other arbitrary flags are also passable via this variable.

Note that these flags and arguments are different from the flags we can already pass in via `CGO_LDFLAGS` and `CGO_CFLAGS`.

-David
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-08-25 17:27:12 UTC
A commit references this bug:

Author: jlaffaye
Date: Sat Aug 25 17:26:16 UTC 2018
New revision: 478076
URL: https://svnweb.freebsd.org/changeset/ports/478076

Log:
  Add GO_BUILDFLAGS variable to Uses/go.mk

  PR:		225812
  Submitted by:	David O'Rourke <dor.bsd@xm0.uk>

Changes:
  head/Mk/Uses/go.mk
Comment 2 Julien Laffaye freebsd_committer freebsd_triage 2018-08-25 17:29:50 UTC
Committed, thanks!