build: Use GOTAGS for static builds as well
This commit is contained in:
4
Makefile
4
Makefile
@@ -118,9 +118,9 @@ $(PROGRAM).static: main.go
|
|||||||
go generate
|
go generate
|
||||||
ifneq ($(OLDGOLANG),)
|
ifneq ($(OLDGOLANG),)
|
||||||
@# avoid equals sign in old golang versions eg in: -X foo=bar
|
@# avoid equals sign in old golang versions eg in: -X foo=bar
|
||||||
go build -a -installsuffix cgo -tags netgo -ldflags '-extldflags "-static" -X main.program $(PROGRAM) -X main.version $(SVERSION)' -o $(PROGRAM).static;
|
go build -a -installsuffix cgo -tags netgo -ldflags '-extldflags "-static" -X main.program $(PROGRAM) -X main.version $(SVERSION)' -o $(PROGRAM).static $(BUILD_FLAGS);
|
||||||
else
|
else
|
||||||
go build -a -installsuffix cgo -tags netgo -ldflags '-extldflags "-static" -X main.program=$(PROGRAM) -X main.version=$(SVERSION)' -o $(PROGRAM).static;
|
go build -a -installsuffix cgo -tags netgo -ldflags '-extldflags "-static" -X main.program=$(PROGRAM) -X main.version=$(SVERSION)' -o $(PROGRAM).static $(BUILD_FLAGS);
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user