Skip to content

Commit e16bf09

Browse files
committed
Simplify CGO flags setup
1 parent 05a1a25 commit e16bf09

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ else
99
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
1010
endif
1111

12-
ifndef CGO_CPPFLAGS
13-
export CGO_CPPFLAGS := $(CPPFLAGS)
14-
endif
15-
ifndef CGO_CFLAGS
16-
export CGO_CFLAGS := $(CFLAGS)
17-
endif
18-
ifndef CGO_LDFLAGS
19-
export CGO_LDFLAGS := $(LDFLAGS)
20-
endif
12+
CGO_CPPFLAGS ?= ${CPPFLAGS}
13+
export CGO_CPPFLAGS
14+
CGO_CFLAGS ?= ${CFLAGS}
15+
export CGO_CFLAGS
16+
CGO_LDFLAGS ?= ${LDFLAGS}
17+
export CGO_LDFLAGS
2118

2219
GO_LDFLAGS := -X github.com/cli/cli/internal/build.Version=$(GH_VERSION) $(GO_LDFLAGS)
2320
GO_LDFLAGS := -X github.com/cli/cli/internal/build.Date=$(BUILD_DATE) $(GO_LDFLAGS)

0 commit comments

Comments
 (0)