aboutsummaryrefslogtreecommitdiffstats
path: root/sys/sys.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-13 19:16:32 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-15 16:02:37 +0200
commit34bc139642b0caed49b2ba2dcb9ccff10e04c55f (patch)
tree4575a76f5c97b3ec7c7dfbfe511917123e8a020b /sys/sys.go
parentb16ba6390d6b2731bf5cfa0ef04aa1299b7306cf (diff)
sys: compile all supported targets into the package
Currently we compile in only GOOS/GOARCH target. Compile in all targets so that they can be selected at runtime.
Diffstat (limited to 'sys/sys.go')
-rw-r--r--sys/sys.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/sys.go b/sys/sys.go
index f41d68dbc..3138143ff 100644
--- a/sys/sys.go
+++ b/sys/sys.go
@@ -4,5 +4,14 @@
package sys
import (
+ "runtime"
+
+ "github.com/google/syzkaller/prog"
_ "github.com/google/syzkaller/sys/linux"
)
+
+func init() {
+ if err := prog.SetDefaultTarget("linux", runtime.GOARCH); err != nil {
+ panic(err)
+ }
+}