From 17f8d6a03dac0bad8ef0a014d10cdcdcc463a7cf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 16 Oct 2017 14:06:13 +0200 Subject: Makefile: strip executor We don't generate debug info for Go binaries to reduce their size. Don't generate debug info for executor as well. For akaros this reduces binary size from 4.5MB to 800KB. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5e38dd2c2..2e269e277 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ ifeq ("$(TARGETOS)", "android") BUILDGCCARCH = "aarch64" endif CC = $(NDK)/toolchains/$(TOOLCHAIN)/prebuilt/$(BUILDOS)-$(BUILDGCCARCH)/bin/$(GCCBIN) - CFLAGS = -I $(NDK)/sources/cxx-stl/llvm-libc++/include --sysroot=$(NDK)/platforms/android-$(ANDROID_API)/arch-$(ANDROIDARCH) -O1 -g -Wall -static + CFLAGS = -I $(NDK)/sources/cxx-stl/llvm-libc++/include --sysroot=$(NDK)/platforms/android-$(ANDROID_API)/arch-$(ANDROIDARCH) -static endif ifeq ("$(TARGETOS)", "fuchsia") @@ -148,8 +148,9 @@ target: executor: mkdir -p ./bin/$(TARGETOS)_$(TARGETARCH) $(CC) -o ./bin/$(TARGETOS)_$(TARGETARCH)/syz-executor$(EXE) executor/executor_$(TARGETOS).cc \ - -pthread -Wall -Wframe-larger-than=8192 -Wparentheses -Werror -O1 -g \ + -pthread -Wall -Wframe-larger-than=8192 -Wparentheses -Werror -O1 \ $(ADDCFLAGS) $(CFLAGS) -DGOOS=\"$(TARGETOS)\" -DGIT_REVISION=\"$(REV)\" + strip --strip-debug ./bin/$(TARGETOS)_$(TARGETARCH)/syz-executor$(EXE) manager: GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(GO) build $(GOFLAGS) -o ./bin/syz-manager github.com/google/syzkaller/syz-manager -- cgit mrf-deployment