diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-05-26 15:32:26 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-05-29 13:15:17 +0200 |
| commit | 108115666bf24c0ed2844f7af9be9a672849bb9c (patch) | |
| tree | dc3143144729076a073f4ad1e34354b5a29e3dea | |
| parent | 9833d36f8b7cf0c472e554e61441510284c4512a (diff) | |
Makefile: don't generate DWARF for Go binaries
Reduces build time and binary sizes considerably.
| -rw-r--r-- | Makefile | 26 |
1 files changed, 16 insertions, 10 deletions
@@ -21,39 +21,45 @@ all-tools: execprog mutate prog2c stress repro upgrade executor: $(CC) -o ./bin/syz-executor executor/executor.cc -pthread -Wall -O1 -g $(STATIC_FLAG) $(CFLAGS) +# Don't generate symbol table and DWARF debug info. +# Reduces build time and binary sizes considerably. +# That's only needed if you use gdb or nm. +# If you need that, build manually without these flags. +GOFLAGS="-ldflags=-s -w" + manager: - go build -o ./bin/syz-manager github.com/google/syzkaller/syz-manager + go build $(GOFLAGS) -o ./bin/syz-manager github.com/google/syzkaller/syz-manager fuzzer: - go build -o ./bin/syz-fuzzer github.com/google/syzkaller/syz-fuzzer + go build $(GOFLAGS) -o ./bin/syz-fuzzer github.com/google/syzkaller/syz-fuzzer execprog: - go build -o ./bin/syz-execprog github.com/google/syzkaller/tools/syz-execprog + go build $(GOFLAGS) -o ./bin/syz-execprog github.com/google/syzkaller/tools/syz-execprog repro: - go build -o ./bin/syz-repro github.com/google/syzkaller/tools/syz-repro + go build $(GOFLAGS) -o ./bin/syz-repro github.com/google/syzkaller/tools/syz-repro mutate: - go build -o ./bin/syz-mutate github.com/google/syzkaller/tools/syz-mutate + go build $(GOFLAGS) -o ./bin/syz-mutate github.com/google/syzkaller/tools/syz-mutate prog2c: - go build -o ./bin/syz-prog2c github.com/google/syzkaller/tools/syz-prog2c + go build $(GOFLAGS) -o ./bin/syz-prog2c github.com/google/syzkaller/tools/syz-prog2c stress: - go build -o ./bin/syz-stress github.com/google/syzkaller/tools/syz-stress + go build $(GOFLAGS) -o ./bin/syz-stress github.com/google/syzkaller/tools/syz-stress upgrade: - go build -o ./bin/syz-upgrade github.com/google/syzkaller/tools/syz-upgrade + go build $(GOFLAGS) -o ./bin/syz-upgrade github.com/google/syzkaller/tools/syz-upgrade extract: bin/syz-extract LINUX=$(LINUX) LINUXBLD=$(LINUXBLD) ./extract.sh bin/syz-extract: syz-extract/*.go sysparser/*.go - go build -o $@ ./syz-extract + go build $(GOFLAGS) -o $@ ./syz-extract generate: bin/syz-sysgen bin/syz-sysgen bin/syz-sysgen: sysgen/*.go sysparser/*.go - go build -o $@ ./sysgen + go build $(GOFLAGS) -o $@ ./sysgen format: go fmt ./... |
