Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 125
    • Merge requests 125
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !274

Merged
Created Jan 25, 2018 by Kirill Smelkov@kirrOwner

golang: Allow users to specify desired buildflags

  • Overview 5
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/go-buildmode
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7