| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # LibFuzzer is a LLVM tool for coverage-guided fuzz testing. | 5 # LibFuzzer is a LLVM tool for coverage-guided fuzz testing. |
| 6 # See http://www.chromium.org/developers/testing/libfuzzer | 6 # See http://www.chromium.org/developers/testing/libfuzzer |
| 7 # | 7 # |
| 8 # To enable libfuzzer, 'use_libfuzzer' GN option should be set to true. | 8 # To enable libfuzzer, 'use_libfuzzer' GN option should be set to true. |
| 9 | 9 |
| 10 import("//build/config/features.gni") | 10 import("//build/config/features.gni") |
| 11 import("//build/config/sanitizers/sanitizers.gni") | 11 import("//build/config/sanitizers/sanitizers.gni") |
| 12 | 12 |
| 13 static_library("libfuzzer_main") { | 13 source_set("libfuzzer_main") { |
| 14 deps = [] | 14 deps = [] |
| 15 sources = [] | 15 sources = [] |
| 16 if (use_libfuzzer) { | 16 if (use_libfuzzer) { |
| 17 deps += [ "//third_party/libFuzzer:libfuzzer" ] | 17 deps += [ "//third_party/libFuzzer:libfuzzer" ] |
| 18 } else if (use_drfuzz) { | 18 } else if (use_drfuzz) { |
| 19 sources += [ "drfuzz_main.cc" ] | 19 sources += [ "drfuzz_main.cc" ] |
| 20 } else { | 20 } else { |
| 21 sources += [ "unittest_main.cc" ] | 21 sources += [ "unittest_main.cc" ] |
| 22 } | 22 } |
| 23 } | 23 } |
| 24 | 24 |
| 25 # Noop config used to tag fuzzer tests excluded from clusterfuzz. | 25 # Noop config used to tag fuzzer tests excluded from clusterfuzz. |
| 26 # Libfuzzer build bot uses this to filter out targets while | 26 # Libfuzzer build bot uses this to filter out targets while |
| 27 # building an archive for clusterfuzz. | 27 # building an archive for clusterfuzz. |
| 28 config("no_clusterfuzz") { | 28 config("no_clusterfuzz") { |
| 29 } | 29 } |
| 30 | 30 |
| 31 # noop to tag seed corpus rules. | 31 # noop to tag seed corpus rules. |
| 32 source_set("seed_corpus") { | 32 source_set("seed_corpus") { |
| 33 } | 33 } |
| OLD | NEW |