aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test/init.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-02 19:07:22 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-08-02 19:07:22 +0200
commitd9a893a554d6077f5cab4aa8a81f24213443232e (patch)
treead7c6ccd2373fe3fd36183f7d9be114e8503b7ac /sys/test/init.go
parent5cbdd9f4445514cbacadc362c2891e40b7f36072 (diff)
Makefile: don't compile all targets into target binaries
Currently target binaries contain support for all OS/arch combinations. However, obviously a fuchsia target binary won't test windows. For target binaries we need support only for a single target (with the exception of 386/arm target in amd64/arm64 binaries). So compile in only _the_ target into target binaries. This reduces akaros/amd64 fuzzer binary from 33 to 7 MB and execprog from 28 to 2 MB.
Diffstat (limited to 'sys/test/init.go')
-rw-r--r--sys/test/init.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/test/init.go b/sys/test/init.go
index 8e67fd754..815c99a98 100644
--- a/sys/test/init.go
+++ b/sys/test/init.go
@@ -6,16 +6,8 @@ package test
import (
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/sys/targets"
- "github.com/google/syzkaller/sys/test/gen"
)
-func init() {
- prog.RegisterTarget(gen.Target_64, initTarget)
- prog.RegisterTarget(gen.Target_64_fork, initTarget)
- prog.RegisterTarget(gen.Target_32_shmem, initTarget)
- prog.RegisterTarget(gen.Target_32_fork_shmem, initTarget)
-}
-
-func initTarget(target *prog.Target) {
+func InitTarget(target *prog.Target) {
target.MakeMmap = targets.MakeSyzMmap(target)
}