-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Added -trimpath option to go build #2064
Added -trimpath option to go build #2064
Conversation
Makefile
Outdated
@@ -193,14 +193,14 @@ elasticsearch-mappings: | |||
build-examples: | |||
esc -pkg frontend -o examples/hotrod/services/frontend/gen_assets.go -prefix examples/hotrod/services/frontend/web_assets examples/hotrod/services/frontend/web_assets | |||
ifeq ($(GOARCH), s390x) | |||
CGO_ENABLED=0 installsuffix=cgo go build -o ./examples/hotrod/hotrod-$(GOOS)-$(GOARCH) ./examples/hotrod/main.go | |||
CGO_ENABLED=0 installsuffix=cgo go build -trimpath -o ./examples/hotrod/hotrod-$(GOOS)-$(GOARCH) ./examples/hotrod/main.go |
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.
it would be better if we define GOBUILD=CGO_ENABLED=0 installsuffix=cgo go build -trimpath
in L30 and use $(GOBUILD)
, to DRY this up.
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.
Makes total sense. I've updated the code.
Codecov Report
@@ Coverage Diff @@
## master #2064 +/- ##
=======================================
Coverage 97.42% 97.42%
=======================================
Files 209 209
Lines 10340 10340
=======================================
Hits 10074 10074
Misses 223 223
Partials 43 43 Continue to review full report at Codecov.
|
is |
Fixes jaegertracing#2063 Signed-off-by: Pablo Caderno <[email protected]> Signed-off-by: kaderno <[email protected]>
Defined variable per suggestion of @yurishkuro Signed-off-by: kaderno <[email protected]>
Signed-off-by: Pablo Caderno <[email protected]> Signed-off-by: kaderno <[email protected]>
Signed-off-by: kaderno <[email protected]>
6cd0453
to
2117ca2
Compare
@pavolloffay it only trims directory path, not the package name. Vendored packages do not have github.com/jaegertracing/... prefix. |
Thanks @kadern0 |
Fixes #2063
Signed-off-by: Pablo Caderno [email protected]
Which problem is this PR solving?
go build -trimpath
#2063Short description of the changes