Skip to content

Commit

Permalink
go-fuzz-build: set GO111MODULE=off while building
Browse files Browse the repository at this point in the history
Updates dvyukov#195
Updates google/oss-fuzz/pull#2188
  • Loading branch information
josharian authored and dvyukov committed May 3, 2019
1 parent 680a04a commit 2ca1aa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ $ go-fuzz-build
This will produce png-fuzz.zip archive.

Note that go-fuzz [does not support modules yet](https://github.com/dvyukov/go-fuzz/issues/195).
You may need to disable modules by setting environment variable `GO111MODULE=off`
before executing `go-fuzz-build`.
`go-fuzz-build` disables modules by setting environment variable `GO111MODULE=off` during the build.

Now we are ready to go:
```
Expand Down
1 change: 1 addition & 0 deletions go-fuzz-build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ func (c *Context) buildInstrumentedBinary(blocks *[]CoverBlock, sonar *[]CoverBl
cmd.Env = append(os.Environ(),
"GOROOT="+filepath.Join(c.workdir, "goroot"),
"GOPATH="+filepath.Join(c.workdir, "gopath"),
"GO111MODULE=off", // temporary measure until we have proper module support
)
if out, err := cmd.CombinedOutput(); err != nil {
c.failf("failed to execute go build: %v\n%v", err, string(out))
Expand Down

0 comments on commit 2ca1aa0

Please sign in to comment.