summaryrefslogtreecommitdiffstats
path: root/build/meson/meson/ossfuzz/meson.build
blob: 9945d8c51bb05a144fd778dfb6815af30e52ce89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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