aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-15 15:56:48 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-15 16:02:37 +0200
commitda1873aaddc53805f845e21dd4e10cb6f9148b1d (patch)
tree4e3858ff4cb6e7bf8a7d64cb46d7d3622394a032 /pkg/csource
parent66393d1884cb6a6d36dcbe5ad772ae9cf8f2adad (diff)
sys/targets: move targets from sys package
This breaks circular dependency between: sysgen -> sys/linux -> sys -> sysgen With this circular dependency it is very difficult to update format of generated descriptions because sysgen does not build.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/csource.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go
index 10059dd9b..7ead83deb 100644
--- a/pkg/csource/csource.go
+++ b/pkg/csource/csource.go
@@ -20,7 +20,7 @@ import (
"unsafe"
"github.com/google/syzkaller/prog"
- "github.com/google/syzkaller/sys"
+ "github.com/google/syzkaller/sys/targets"
)
type Options struct {
@@ -481,7 +481,7 @@ func preprocessCommonHeader(target *prog.Target, opts Options, handled map[strin
defines = append(defines, "__NR_"+name)
}
- sysTarget := sys.Targets[target.OS][target.Arch]
+ sysTarget := targets.List[target.OS][target.Arch]
defines = append(defines, sysTarget.CArch...)
cmd := exec.Command("cpp", "-nostdinc", "-undef", "-fdirectives-only", "-dDI", "-E", "-P", "-")
@@ -529,7 +529,7 @@ func Build(target *prog.Target, lang, src string) (string, error) {
return "", fmt.Errorf("failed to create temp file: %v", err)
}
bin.Close()
- sysTarget := sys.Targets[target.OS][target.Arch]
+ sysTarget := targets.List[target.OS][target.Arch]
compiler := sysTarget.CCompilerPrefix + "gcc"
if _, err := exec.LookPath(compiler); err != nil {
return "", NoCompilerErr