aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-10-16 14:06:13 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-10-16 14:21:54 +0200
commit17f8d6a03dac0bad8ef0a014d10cdcdcc463a7cf (patch)
tree535c1fed09d95cf8251b869329a7ffac39be7456 /Makefile
parentc2337c94bffa1e752c0523c3c7d46522d317e238 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
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