aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOvidiu Panait <ovpanait@gmail.com>2021-06-05 19:31:13 +0000
committerDmitry Vyukov <dvyukov@google.com>2021-11-29 15:18:43 +0100
commitefd9a70bcb71d237ac8557ea08b003d283246e08 (patch)
tree5e5af83a8120b3afae3a2ef7cf977ed1c483d94a /Makefile
parent63eeac0211717f83d52631540a150a4c5844e0f9 (diff)
Makefile: allow GOHOSTFLAGS and GOTARGETFLAGS to be overridden
Allow the user to override host/target build flags (such as debug info generation flags). This is useful for example when syzkaller is compiled by the Yocto build system, as it always generates packages with debug info. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 49b16e363..37cbbb17a 100644
--- a/Makefile
+++ b/Makefile
@@ -67,8 +67,8 @@ GITREVDATE=$(shell git log -n 1 --format="%cd" --date=format:%Y%m%d-%H%M%S)
# If you need that, build manually without these flags.
GOFLAGS := "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=$(REV) -X 'github.com/google/syzkaller/prog.gitRevisionDate=$(GITREVDATE)'"
-GOHOSTFLAGS := $(GOFLAGS)
-GOTARGETFLAGS := $(GOFLAGS)
+GOHOSTFLAGS ?= $(GOFLAGS)
+GOTARGETFLAGS ?= $(GOFLAGS)
ifneq ("$(GOTAGS)", "")
GOHOSTFLAGS += "-tags=$(GOTAGS)"
endif