comparison mupdf-source/thirdparty/zint/backend/tests/fuzz/build.sh @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #!/bin/bash -eu
2 # Copyright 2024 Google LLC
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 ################################################################################
17
18 # build project
19 mkdir build
20 cd build
21 cmake -DZINT_STATIC=ON -DZINT_SHARED=OFF \
22 -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF -DZINT_FRONTEND=OFF \
23 -DCMAKE_BUILD_TYPE=Debug \
24 ..
25 make -j$(nproc)
26
27 # build fuzzers
28 bd=$SRC/zint/backend
29
30 fd=$bd/tests/fuzz
31 fn=fuzz_data
32 $CC $CFLAGS -fsanitize=fuzzer-no-link -I${bd} $fd/${fn}.c -c -o $WORK/${fn}.o
33 $CXX $CXXFLAGS $WORK/${fn}.o -o $OUT/${fn} \
34 $LIB_FUZZING_ENGINE -lm -lzint -Lbackend
35 cp $fd/${fn}_seed_corpus.zip $OUT
36
37 fn=fuzz_gs1
38 $CC $CFLAGS -fsanitize=fuzzer-no-link -I${bd} $fd/${fn}.c -c -o $WORK/${fn}.o
39 $CXX $CXXFLAGS $WORK/${fn}.o -o $OUT/${fn} \
40 $LIB_FUZZING_ENGINE -lm -lzint -Lbackend
41 cp $fd/${fn}_seed_corpus.zip $OUT
42 cp $fd/${fn}.dict $OUT