Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-vlc@jannau.net>2018-10-02 20:20:52 +0300
committerJanne Grunau <janne-vlc@jannau.net>2018-10-03 17:15:35 +0300
commit858689e1dfb0f910834bd19bcf3e5270482fc8f8 (patch)
tree6dcb7a202bbaef555038ba254864d3686433dbb6 /meson.build
parent47886aed9f041eaa484460893ba6bdd77f270ee7 (diff)
tests: add libfuzzer test target
Disabled by default, enabble with `meson -Dbuild_libfuzzer=true -Db_lundef=false ...`. Fuzz target improved by the paralell work by Thierry Foucu in !138.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index da95f66..4231b84 100644
--- a/meson.build
+++ b/meson.build
@@ -64,6 +64,9 @@ is_asm_enabled = (get_option('build_asm') == true and
host_machine.cpu_family().startswith('arm'))
cdata.set10('HAVE_ASM', is_asm_enabled)
+# libFuzzer target
+is_libfuzzer_enabled = (get_option('build_libfuzzer'))
+
#
@@ -156,6 +159,14 @@ endif
add_project_arguments(cc.get_supported_arguments(optional_arguments), language : 'c')
+# libFuzzer related things
+if is_libfuzzer_enabled
+ if not cc.has_argument('-fsanitize=fuzzer')
+ error('build_libfuzzer requires "-fsanitize=fuzzer"')
+ endif
+ fuzzer_args = ['-fsanitize=fuzzer-no-link', '-fsanitize=fuzzer']
+ add_project_arguments(cc.first_supported_argument(fuzzer_args), language : 'c')
+endif
# Stack alignments flags