diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-10-22 15:41:03 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-10-22 15:41:03 +0200 |
| commit | 084e388155d4ea60d54e44b90cd10eef660a5b76 (patch) | |
| tree | 5a072ff66df7d401257da468a8529b172ab9b285 /pkg/vcs/linux.go | |
| parent | a2bdbd8c37841cc507a2ad59f25d90d6467e5858 (diff) | |
pkg/vcs: make EnvForCommit return full compiler path
All callers of EnvForCommit need the compiler path,
so move this logic into EnvForCommit to avoid duplication.
Also simplifies tests because test impl can now return
an empty compiler (which should be unused).
Diffstat (limited to 'pkg/vcs/linux.go')
| -rw-r--r-- | pkg/vcs/linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index aaca97fe7..b14b75280 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -88,7 +88,7 @@ func gitReleaseTagToInt(tag string) uint64 { return v1*1e6 + v2*1e3 + v3 } -func (ctx *linux) EnvForCommit(commit string, kernelConfig []byte) (*BisectEnv, error) { +func (ctx *linux) EnvForCommit(binDir, commit string, kernelConfig []byte) (*BisectEnv, error) { tagList, err := ctx.previousReleaseTags(commit, true) if err != nil { return nil, err @@ -98,7 +98,7 @@ func (ctx *linux) EnvForCommit(commit string, kernelConfig []byte) (*BisectEnv, tags[tag] = true } env := &BisectEnv{ - Compiler: "gcc-" + linuxCompilerVersion(tags), + Compiler: filepath.Join(binDir, "gcc-"+linuxCompilerVersion(tags), "bin", "gcc"), KernelConfig: linuxDisableConfigs(kernelConfig, tags), } // v4.0 doesn't boot with our config nor with defconfig, it halts on an interrupt in x86_64_start_kernel. |
