Skip to content

Commit

Permalink
Filter flags taken from LDFLAGS into CGO_LDFLAGS
Browse files Browse the repository at this point in the history
Make sure we take only flags compatible with cgo.

Solves: cli#2577
  • Loading branch information
ismaell committed Dec 8, 2020
1 parent f415245 commit d7f68e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CGO_CPPFLAGS ?= ${CPPFLAGS}
export CGO_CPPFLAGS
CGO_CFLAGS ?= ${CFLAGS}
export CGO_CFLAGS
CGO_LDFLAGS ?= ${LDFLAGS}
CGO_LDFLAGS ?= $(filter -g -L% -l% -O%,${LDFLAGS})
export CGO_LDFLAGS

GO_LDFLAGS := -X github.com/cli/cli/internal/build.Version=$(GH_VERSION) $(GO_LDFLAGS)
Expand Down

0 comments on commit d7f68e9

Please sign in to comment.