From 95777977ade5226323e35e6e5fa1594327640732 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 21 Apr 2021 09:16:52 +0200 Subject: sys: commit empty source files Commit empty files into generated packages, so that the tree is buildable even w/o generated files and Go tools continue to work. --- sys/akaros/gen/empty.go | 6 ++++++ sys/freebsd/gen/empty.go | 6 ++++++ sys/fuchsia/gen/empty.go | 6 ++++++ sys/linux/gen/empty.go | 6 ++++++ sys/netbsd/gen/empty.go | 6 ++++++ sys/openbsd/gen/empty.go | 6 ++++++ sys/syz-sysgen/sysgen.go | 9 --------- sys/test/gen/empty.go | 6 ++++++ sys/windows/gen/empty.go | 6 ++++++ 9 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 sys/akaros/gen/empty.go create mode 100644 sys/freebsd/gen/empty.go create mode 100644 sys/fuchsia/gen/empty.go create mode 100644 sys/linux/gen/empty.go create mode 100644 sys/netbsd/gen/empty.go create mode 100644 sys/openbsd/gen/empty.go create mode 100644 sys/test/gen/empty.go create mode 100644 sys/windows/gen/empty.go (limited to 'sys') diff --git a/sys/akaros/gen/empty.go b/sys/akaros/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/akaros/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/freebsd/gen/empty.go b/sys/freebsd/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/freebsd/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/fuchsia/gen/empty.go b/sys/fuchsia/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/fuchsia/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/linux/gen/empty.go b/sys/linux/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/linux/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/netbsd/gen/empty.go b/sys/netbsd/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/netbsd/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/openbsd/gen/empty.go b/sys/openbsd/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/openbsd/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go index a17186731..93452160a 100644 --- a/sys/syz-sysgen/sysgen.go +++ b/sys/syz-sysgen/sysgen.go @@ -148,7 +148,6 @@ func main() { job.OK = true }() } - writeEmpty(OS) wg.Wait() var syscallArchs []ArchData @@ -232,14 +231,6 @@ func generate(target *targets.Target, prg *compiler.Prog, consts map[string]uint fmt.Fprintf(out, "\n\n") } -func writeEmpty(OS string) { - const data = `// AUTOGENERATED FILE -// This file is needed if OS is completely excluded by build tags. -package gen -` - writeSource(filepath.Join(*outDir, "sys", OS, "gen", "empty.go"), []byte(data)) -} - func generateExecutorSyscalls(target *targets.Target, syscalls []*prog.Syscall, rev string) ArchData { data := ArchData{ Revision: rev, diff --git a/sys/test/gen/empty.go b/sys/test/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/test/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. diff --git a/sys/windows/gen/empty.go b/sys/windows/gen/empty.go new file mode 100644 index 000000000..7884be456 --- /dev/null +++ b/sys/windows/gen/empty.go @@ -0,0 +1,6 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package gen + +// Empty file to unbreak build while descriptions are not generated. -- cgit mrf-deployment