Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !274

golang: Allow users to specify desired buildflags

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Kirill Smelkov requested to merge kirr/slapos:y/go-buildmode into master Jan 25, 2018
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

For example one could want to build the software with race detector, e.g.

[gowork]
...
buildflags = -race

or if you want to build a plugin for fluent-bit

[gowork]
...
install	   = your.package.import.path
buildflags = -buildmode=c-shared

and then your package will be installed as shared library into

${gowork:directory}/pkg/`go env GOOS`_`go env GOARCH`/<your.package.import.path>.a

One could pass that location explicitly to fluentd-bit -e ... or symlink to it from some .so from global directory of fluent-bit plugins.

Maybe it is not very good to use go install for building plugins (instead of go build -o ...) but we anyway need to have ability to specify buildflags as a generic feature, hence this patch.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: y/go-buildmode
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7