mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 19:54:41 +07:00
chore: amd64 and arm64 use PIE build mode by default (#272)
This commit is contained in:
parent
e7f774001a
commit
3ee7b63d24
8
Makefile
8
Makefile
@ -22,6 +22,7 @@ else ifeq ($(wildcard $(STRIP_PATH)),)
|
||||
else
|
||||
STRIP_FLAG := -strip=$(STRIP_PATH)
|
||||
endif
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
|
||||
# Do NOT remove the line below. This line is for CI.
|
||||
#export GOMODCACHE=$(PWD)/go-mod
|
||||
@ -36,7 +37,12 @@ else
|
||||
VERSION ?= unstable-$(date).r$(count).$(commit)
|
||||
endif
|
||||
|
||||
BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_ARGS)
|
||||
# amd64 and arm64 use PIE build mode by default
|
||||
ifeq ($(GOARCH),$(filter $(GOARCH),amd64 arm64))
|
||||
BUILD_MODE ?= -buildmode=pie
|
||||
endif
|
||||
|
||||
BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_MODE) $(BUILD_ARGS)
|
||||
|
||||
.PHONY: clean-ebpf ebpf dae submodule submodules
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user