File: meson.build

package info (click to toggle)
glib2.0 2.66.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, bullseye-backports
  • size: 49,488 kB
  • sloc: ansic: 482,057; xml: 17,293; python: 7,705; sh: 1,310; perl: 1,140; makefile: 194; cpp: 9
file content (31 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (2)
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
fuzz_targets = [
  'fuzz_bookmark',
  'fuzz_dbus_message',
  'fuzz_key',
  'fuzz_uri_escape',
  'fuzz_uri_parse',
  'fuzz_uri_parse_params',
  'fuzz_variant_binary',
  'fuzz_variant_text',
]

deps = [libgmodule_dep, libgio_dep, libglib_dep, libgobject_dep]

extra_sources = []
extra_c_args = cc.get_supported_arguments('-Werror=unused-function')

# Links in a static library provided by oss-fuzz, else a standalone driver.
# https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#buildsh-script-environment
fuzzing_engine = cxx.find_library('FuzzingEngine', required : get_option('oss_fuzz'))
if fuzzing_engine.found()
  deps += fuzzing_engine
else
  extra_sources += 'driver.c'
endif

foreach target_name : fuzz_targets
  exe = executable(target_name, [extra_sources, target_name + '.c'],
    c_args : extra_c_args,
    dependencies : deps,
  )
endforeach