diff --git a/Makefile b/Makefile index c10d4f0f57..2f577bf6c6 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ GIT_COMMIT ?= `git rev-parse --short HEAD` VERSION ?= `git describe --always` GO_VERSION ?= `go version | awk '{print $$3}'` BUILD_DATE = `date +%FT%T%z` -BUILD_FLAGS = "-X main.gitCommit=$(GIT_COMMIT) -X main.version=$(VERSION) -X main.goVersion=$(GO_VERSION) -X main.buildDate=$(BUILD_DATE)" +BUILD_FLAGS = "`[[ -z "$(STATIC)" ]] && echo "" || echo "-extldflags=-static"` -X main.gitCommit=$(GIT_COMMIT) -X main.version=$(VERSION) -X main.goVersion=$(GO_VERSION) -X main.buildDate=$(BUILD_DATE)" .PHONY: revad revad: diff --git a/changelog/unreleased/enhancement-static.md b/changelog/unreleased/enhancement-static.md new file mode 100644 index 0000000000..ecdb44eeea --- /dev/null +++ b/changelog/unreleased/enhancement-static.md @@ -0,0 +1,6 @@ +Enhancement: Add support for static linking + +We've added support for compiling reva with static linking enabled. +It's possible to do so with the `STATIC` flag: `make revad STATIC=true` + +https://github.com/cs3org/reva/pull/3733 \ No newline at end of file