xref: /aosp_15_r20/external/golang-protobuf/internal/fuzz/oss-fuzz-build.sh (revision 1c12ee1efe575feb122dbf939ff15148a3b3e8f2)
1# Copyright 2020 The Go Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style
3# license that can be found in the LICENSE file.
4
5# This script is executed by OSS-Fuzz's build to create fuzzer binaries.
6
7for x in internal/fuzz/*; do
8  if [ -d $x/corpus ]; then
9    name=$(basename $x)
10    compile_go_fuzzer google.golang.org/protobuf/$x Fuzz $name protolegacy
11    zip -jr $OUT/${name}_seed_corpus.zip $x/corpus
12  fi
13done
14