-
Notifications
You must be signed in to change notification settings - Fork 230
Makefile: add Go debug support for local binaries #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile: add Go debug support for local binaries #96
Conversation
Makefile
Outdated
| @@ -1,8 +1,13 @@ | |||
| DBG ?= 1 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be enabled by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be enabled by default?
Argh! Left over from my testing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be enabled by default?
Fixed.
Invoking the following:
$ make build DBG=1
$ make nodelink-controller DBG=1
$ make test-e2e DBG=1
will build the respective binaries with Go debug support. The build
rules for those three targets are now `go build $(GOGCFLAGS) ...`.
The default value for GOGCFLAGS is -gcflags=all="-N -l", assuming
GOGCFLAGS it not already set in your environment. "all" specifies that
the flags should be applied to all packages (and may rebuild existing
up to date packages); "-N" disables compiler optimisations and "-l"
prevents inlining.
So, to override the defaults:
$ make build DBG=1 GOGCFLAGS='-gcflags="-N -l"'
7b0ec95 to
348a703
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: paulfantom The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
remove log-level option
Add liveness/readiness probes
…enshift-4.19-ose-machine-api-provider-gcp OCPBUGS-45733: Updating ose-machine-api-provider-gcp-container image to be consistent with ART for 4.19
Invoking the following:
will build the respective binaries with Go debug support. The build
rules for those three targets are now
go build $(GOGCFLAGS) ....The default value for GOGCFLAGS is -gcflags=all="-N -l", assuming
GOGCFLAGS it not already set in your environment. "all" specifies that
the flags should be applied to all packages (and may rebuild existing
up to date packages); "-N" disables compiler optimisations and "-l"
prevents inlining.
So, to override the defaults: