summaryrefslogtreecommitdiffstats
path: root/build/meson/meson/ossfuzz/meson.build
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2023-02-07 22:59:06 (GMT)
committerGitHub <noreply@github.com>2023-02-07 22:59:06 (GMT)
commit185cf420206cf68a2a5cee8cdaf11145db7cd971 (patch)
tree22999d2208c0a4cbedb06a1e688433f46cb75a12 /build/meson/meson/ossfuzz/meson.build
parent1f3adea1c68ea61f41903d959b4f98f45aa527a7 (diff)
parent7ab223b7fa2f5b28cfaa4c800db78ad82287be40 (diff)
downloadlz4-185cf420206cf68a2a5cee8cdaf11145db7cd971.zip
lz4-185cf420206cf68a2a5cee8cdaf11145db7cd971.tar.gz
lz4-185cf420206cf68a2a5cee8cdaf11145db7cd971.tar.bz2
Merge pull request #1207 from eli-schwartz/meson
build: move meson files from contrib, to go alongside other build systems
Diffstat (limited to 'build/meson/meson/ossfuzz/meson.build')
-rw-r--r--build/meson/meson/ossfuzz/meson.build35
1 files changed, 35 insertions, 0 deletions
diff --git a/build/meson/meson/ossfuzz/meson.build b/build/meson/meson/ossfuzz/meson.build
new file mode 100644
index 0000000..9945d8c
--- /dev/null
+++ b/build/meson/meson/ossfuzz/meson.build
@@ -0,0 +1,35 @@
+fuzzers = [
+ 'compress_frame_fuzzer',
+ 'compress_fuzzer',
+ 'compress_hc_fuzzer',
+ 'decompress_frame_fuzzer',
+ 'decompress_fuzzer',
+ 'round_trip_frame_uncompressed_fuzzer',
+ 'round_trip_fuzzer',
+ 'round_trip_hc_fuzzer',
+ 'round_trip_stream_fuzzer'
+]
+
+c_args = cc.get_supported_arguments(
+ '-Wno-unused-function',
+ '-Wno-sign-compare',
+ '-Wno-declaration-after-statement'
+)
+
+foreach f : fuzzers
+ lib = static_library(
+ f,
+ lz4_source_root / 'ossfuzz/@0@.c'.format(f),
+ lz4_source_root / 'ossfuzz/lz4_helpers.c',
+ lz4_source_root / 'ossfuzz/fuzz_data_producer.c',
+ c_args: c_args,
+ dependencies: [liblz4_internal_dep]
+ )
+
+ executable(
+ f,
+ lz4_source_root / 'ossfuzz/standaloneengine.c',
+ link_with: lib,
+ dependencies: [liblz4_internal_dep]
+ )
+endforeach