Oliver Chang | e67d218 | 2016-02-16 11:42:07 -0800 | [diff] [blame] | 1 | # Copyright 2016 The PDFium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("../../pdfium.gni") |
| 6 | |
| 7 | config("libfuzzer_config") { |
| 8 | defines = [ |
| 9 | "PNG_PREFIX", |
Oliver Chang | e67d218 | 2016-02-16 11:42:07 -0800 | [diff] [blame] | 10 | "PNG_USE_READ_MACROS", |
| 11 | ] |
| 12 | include_dirs = [ "../.." ] |
| 13 | if (pdf_enable_v8) { |
| 14 | defines += [ "PDF_ENABLE_V8" ] |
| 15 | } |
| 16 | if (pdf_enable_xfa) { |
| 17 | defines += [ "PDF_ENABLE_XFA" ] |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | if (pdf_enable_xfa) { |
| 22 | source_set("pdf_fm2js_fuzzer") { |
| 23 | testonly = true |
| 24 | sources = [ |
| 25 | "pdf_fm2js_fuzzer.cc", |
| 26 | ] |
| 27 | deps = [ |
| 28 | "//third_party/pdfium:pdfium", |
| 29 | ] |
| 30 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 31 | configs += [ |
| 32 | "//build/config/compiler:no_chromium_code", |
| 33 | ":libfuzzer_config", |
| 34 | ] |
| 35 | } |
| 36 | source_set("pdf_xml_fuzzer") { |
| 37 | testonly = true |
| 38 | sources = [ |
| 39 | "pdf_xml_fuzzer.cc", |
| 40 | ] |
| 41 | deps = [ |
| 42 | "//third_party/pdfium:pdfium", |
| 43 | ] |
| 44 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 45 | configs += [ |
| 46 | "//build/config/compiler:no_chromium_code", |
| 47 | ":libfuzzer_config", |
| 48 | ] |
| 49 | } |
Oliver Chang | 238bfb7 | 2016-03-21 10:31:00 -0700 | [diff] [blame^] | 50 | } |
| 51 | |
| 52 | source_set("pdf_jpx_fuzzer") { |
| 53 | testonly = true |
| 54 | sources = [ |
| 55 | "pdf_jpx_fuzzer.cc", |
| 56 | ] |
| 57 | deps = [ |
| 58 | "//third_party/pdfium:pdfium", |
| 59 | ] |
| 60 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 61 | configs += [ |
| 62 | "//build/config/compiler:no_chromium_code", |
| 63 | ":libfuzzer_config", |
| 64 | ] |
Oliver Chang | e67d218 | 2016-02-16 11:42:07 -0800 | [diff] [blame] | 65 | } |