From ad155aa4289990cd08c77c0e4e5ecc4d63df6ff3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 25 Jul 2018 10:44:45 +0200 Subject: pkg/csource: say what compiler is missing --- pkg/csource/build.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/csource/build.go') diff --git a/pkg/csource/build.go b/pkg/csource/build.go index 3befa092d..391d437a1 100644 --- a/pkg/csource/build.go +++ b/pkg/csource/build.go @@ -5,7 +5,6 @@ package csource import ( "bytes" - "errors" "fmt" "io/ioutil" "os" @@ -30,7 +29,7 @@ func build(target *prog.Target, src []byte, file string) (string, error) { sysTarget := targets.Get(target.OS, target.Arch) compiler := sysTarget.CCompiler if _, err := exec.LookPath(compiler); err != nil { - return "", ErrNoCompiler + 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. @@ -70,8 +69,6 @@ func build(target *prog.Target, src []byte, file string) (string, error) { return bin, nil } -var ErrNoCompiler = errors.New("no target compiler") - // Format reformats C source using clang-format. func Format(src []byte) ([]byte, error) { stdout, stderr := new(bytes.Buffer), new(bytes.Buffer) -- cgit mrf-deployment