aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/build.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-04-29 15:31:23 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-04-29 16:32:33 +0200
commit3b93a8e0034a8109125737a9019e6e787f81ec2b (patch)
tree70da3f3111a10b3127c3acb0e4c0ab2b12618334 /pkg/csource/build.go
parent08bed8d76911c9f004a2997c550687351faa52ce (diff)
sys/targets: better detection for missing/broken cross-compilers
1. Detect when compiler is present, but is not functioning (can't build a simple program, common for Linux distros). 2. Be more strict with skipping tests due to missing/broken compilers on CI (on CI they should work, so fail loudly if not). 3. Dedup this logic across syz-env and pkg/csource tests. 4. Add better error reporting for syz-env. Fixes #1606
Diffstat (limited to 'pkg/csource/build.go')
-rw-r--r--pkg/csource/build.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/pkg/csource/build.go b/pkg/csource/build.go
index 56d5487a8..1269987e5 100644
--- a/pkg/csource/build.go
+++ b/pkg/csource/build.go
@@ -8,7 +8,6 @@ import (
"fmt"
"io/ioutil"
"os"
- "os/exec"
"runtime"
"github.com/google/syzkaller/pkg/osutil"
@@ -37,9 +36,6 @@ func BuildFile(target *prog.Target, src string) (string, error) {
func build(target *prog.Target, src []byte, file string, warn bool) (string, error) {
sysTarget := targets.Get(target.OS, target.Arch)
compiler := sysTarget.CCompiler
- if _, err := exec.LookPath(compiler); err != nil {
- return "", fmt.Errorf("no target compiler %v", compiler)
- }
// We call the binary syz-executor because it sometimes shows in bug titles,
// and we don't want 2 different bugs for when a crash is triggered during fuzzing and during repro.
bin, err := osutil.TempFile("syz-executor")