aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-04-21 09:16:52 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-04-21 09:43:39 +0200
commit95777977ade5226323e35e6e5fa1594327640732 (patch)
tree3eb389dc03bcf533d1e6aaceab043090b50ceac0 /sys
parentc0ced5570c6505a80235b64884c93e89733b77f3 (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/akaros/gen/empty.go6
-rw-r--r--sys/freebsd/gen/empty.go6
-rw-r--r--sys/fuchsia/gen/empty.go6
-rw-r--r--sys/linux/gen/empty.go6
-rw-r--r--sys/netbsd/gen/empty.go6
-rw-r--r--sys/openbsd/gen/empty.go6
-rw-r--r--sys/syz-sysgen/sysgen.go9
-rw-r--r--sys/test/gen/empty.go6
-rw-r--r--sys/windows/gen/empty.go6
9 files changed, 48 insertions, 9 deletions
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.