From f89a571fcb8d9784a5def0129f9db5f856dd4a19 Mon Sep 17 00:00:00 2001 From: metzman Date: Mon, 25 Jul 2016 02:14:09 -0700 Subject: [PATCH] [AFL] Allow webrtc fuzzers to be used with afl-fuzz. BUG=chromium:611337 Review-Url: https://codereview.webrtc.org/2143053002 Cr-Commit-Position: refs/heads/master@{#13519} --- setup_links.py | 1 + webrtc/BUILD.gn | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup_links.py b/setup_links.py index 4cf91f7e28..861ef719bb 100755 --- a/setup_links.py +++ b/setup_links.py @@ -33,6 +33,7 @@ DIRECTORIES = [ 'buildtools', 'mojo', # TODO(kjellander): Remove, see webrtc:5629. 'testing', + 'third_party/afl', 'third_party/binutils', 'third_party/boringssl', 'third_party/colorama', diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 287d224d43..3e197ed096 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -227,7 +227,7 @@ config("common_config") { ] } - if (use_libfuzzer || use_drfuzz) { + if (use_libfuzzer || use_drfuzz || use_afl) { # Used in Chromium's overrides to disable logging defines += [ "WEBRTC_UNSAFE_FUZZER_MODE" ] } @@ -375,7 +375,7 @@ if (rtc_enable_protobuf) { } } -if (use_libfuzzer || use_drfuzz) { +if (use_libfuzzer || use_drfuzz || use_afl) { # This target is only here for gn to discover fuzzer build targets under # webrtc/test/fuzzers/. group("webrtc_fuzzers_dummy") {