Skip to content

Commit

Permalink
Add build option to Makefile for removing static compile flags (#3026)
Browse files Browse the repository at this point in the history
this make it possible to remove one patch file from
https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/testing/woodpecker
  • Loading branch information
6543 authored Dec 27, 2023
1 parent 840fca1 commit eefa64e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ else
endif
endif

LDFLAGS := -s -w -extldflags "-static" -X go.woodpecker-ci.org/woodpecker/v2/version.Version=${VERSION}
LDFLAGS := -X go.woodpecker-ci.org/woodpecker/v2/version.Version=${VERSION}
STATIC_BUILD ?= true
ifeq ($(STATIC_BUILD),true)
LDFLAGS := -s -w -extldflags "-static" $(LDFLAGS)
endif
CGO_ENABLED ?= 1 # only used to compile server

HAS_GO = $(shell hash go > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
Expand Down

0 comments on commit eefa64e

Please sign in to comment.