-
Notifications
You must be signed in to change notification settings - Fork 50
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
build: Use ldflags in win-{gvproxy,sshproxy} targets #279
Conversation
@n1hility can you take a look? |
@cfergeau I can see stripping DWARF, but with trying to get more analysis out of crashes/hangs, I wonder if we should not strip symbols? crash dumps and debug backtraces (native stacks) are near impossible to gather without these. |
I could have described this PR as "use same build/linker flags for all binaries", which would make the discussion about stripping the binaries slightly orthogonal to the PR :) To be honest, so far, with go programs, I did not have many (any?) bugs where the only information to fix it was a backtrace, so between debug symbols and a 30% to 50% increase in binary size, the choice is easily made. But maybe you had a different experience with that? |
The windowsgui binary is currently 50% bigger than its non-windowsgui counterpart. This size difference is gone when win-gvproxy is built with '-s -w' as the other binaries. Signed-off-by: Christophe Fergeau <[email protected]>
I think that is better approach if we really want to ship debug info as part of binary. By default better to have same linker flag for each target. |
|
||
# gvproxy for windows is compiled as a windows GUI to support backgrounding | ||
.PHONY: win-gvproxy | ||
win-gvproxy: | ||
GOOS=windows go build -ldflags -H=windowsgui -o bin/gvproxy.exe ./cmd/gvproxy | ||
GOOS=windows go build -ldflags "$(LDFLAGS) -H=windowsgui" -o bin/gvproxy.exe ./cmd/gvproxy |
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.
👍🏼
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau, praveenkumar 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 |
The windowsgui binary is currently 50% bigger than its non-windowsgui
counterpart. This size difference is gone when win-gvproxy is built with
'-s -w' as the other binaries.