From efd9a70bcb71d237ac8557ea08b003d283246e08 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Sat, 5 Jun 2021 19:31:13 +0000 Subject: 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 --- Makefile | 4 ++-- 1 file 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 -- cgit mrf-deployment