From 66393d1884cb6a6d36dcbe5ad772ae9cf8f2adad Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 15 Sep 2017 14:15:52 +0200 Subject: pkg/compiler: don't genererate missing syscalls We used to generate them only because manager had no idea what arch it is testing. So syscalls numbers had to match between all arches. This is not needed anymore. Also don't generate unreferenced structs/resources. --- pkg/compiler/compiler.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/compiler/compiler.go') diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index f6641f9c9..d54ac4678 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -54,6 +54,7 @@ func Compile(desc *ast.Description, consts map[string]uint64, ptrSize uint64, eh structs: make(map[string]*ast.Struct), intFlags: make(map[string]*ast.IntFlags), strFlags: make(map[string]*ast.StrFlags), + used: make(map[string]bool), structDescs: make(map[prog.StructKey]*prog.StructDesc), structNodes: make(map[*prog.StructDesc]*ast.Struct), structVarlen: make(map[string]bool), @@ -88,6 +89,7 @@ type compiler struct { structs map[string]*ast.Struct intFlags map[string]*ast.IntFlags strFlags map[string]*ast.StrFlags + used map[string]bool // contains used structs/resources structDescs map[prog.StructKey]*prog.StructDesc structNodes map[*prog.StructDesc]*ast.Struct -- cgit mrf-deployment