xref: /aosp_15_r20/external/libldac/fuzzer/ossfuzz.sh (revision aef9bcd9217ad2365ebc8e70efaf94b64e04df14)
1# Copyright (C) 2022 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15################################################################################
16
17$CXX $CXXFLAGS -Iinc -c fuzzer/libldac_encode_fuzzer.cc -o libldac_encode_fuzzer.o
18$CC $CFLAGS -Iinc -c src/ldaclib.c -o src/ldaclib.o
19$CC $CFLAGS -Iinc -c src/ldacBT.c -o src/ldacBT.o
20
21$CXX $CXXFLAGS $LIB_FUZZING_ENGINE \
22    libldac_encode_fuzzer.o \
23    src/ldaclib.o \
24    src/ldacBT.o \
25    -o $OUT/libldac_encode_fuzzer
26
27zip -q $OUT/libldac_encode_fuzzer_seed_corpus.zip $SRC/corpora/*
28