git/oss-fuzz/meson.build
Patrick Steinhardt ebb35369f1 meson: simplify use of the common-main library
The "common-main.c" file is used by multiple executables. In order to
make it easy to set it up we have created a separate library that these
executables can link against. All of these executables also want to link
against `libgit.a` though, which makes it necessary to specify both of
these as dependencies for every executable.

Simplify this a bit by declaring the library as a source dependency:
instead of creating a static library, we now instead compile the common
set of files into each executable separately.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26 09:09:35 -08:00

21 lines
417 B
Meson

fuzz_programs = [
'fuzz-commit-graph.c',
'fuzz-config.c',
'fuzz-credential-from-url-gently.c',
'fuzz-date.c',
'fuzz-pack-headers.c',
'fuzz-pack-idx.c',
'fuzz-parse-attr-line.c',
'fuzz-url-decode-mem.c',
]
foreach fuzz_program : fuzz_programs
executable(fs.stem(fuzz_program),
sources: [
'dummy-cmd-main.c',
fuzz_program,
],
dependencies: [libgit_commonmain],
)
endforeach