summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/fuzzers.gyp
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2016-02-16 11:42:07 -0800
committerOliver Chang <ochang@chromium.org>2016-02-16 11:42:07 -0800
commite67d21825c9fd4b805b9bea211e09225f3c2a85d (patch)
tree992a03762cedc49b2d1b60054be1a81ecb0d0f77 /testing/libfuzzer/fuzzers.gyp
parent5f554133283d03b6b30bcecfcdc689cccf3799ec (diff)
downloadpdfium-e67d21825c9fd4b805b9bea211e09225f3c2a85d.tar.xz
Add initial libfuzzers for fm2js transpiling and XML parsing.
GN source_sets are added so that the fuzzers can be built from //testing/libfuzzer in a Chromium checkout. GYP targets are also added to make sure these always build properly on our waterfall. These don't actually build the proper libfuzzers, but build the target fuzz function with a driver main() since the actual build process is quite complicated. R=tsepez@chromium.org, thestig@chromium.org BUG=587126 Review URL: https://codereview.chromium.org/1701103002 .
Diffstat (limited to 'testing/libfuzzer/fuzzers.gyp')
-rw-r--r--testing/libfuzzer/fuzzers.gyp65
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/libfuzzer/fuzzers.gyp b/testing/libfuzzer/fuzzers.gyp
new file mode 100644
index 0000000000..a3c0d452b5
--- /dev/null
+++ b/testing/libfuzzer/fuzzers.gyp
@@ -0,0 +1,65 @@
+# Copyright 2016 PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'pdf_enable_v8%': 1,
+ 'pdf_enable_xfa%': 0, # Set to 1 in standalone builds by standalone.gypi.
+ },
+ 'target_defaults': {
+ 'defines' : [
+ 'PNG_PREFIX',
+ 'PNGPREFIX_H',
+ 'PNG_USE_READ_MACROS',
+ ],
+ 'include_dirs': [
+ # This is implicit in GN.
+ '<(DEPTH)',
+ ],
+ 'conditions': [
+ ['pdf_enable_v8==1', {
+ 'defines': [
+ 'PDF_ENABLE_V8',
+ ],
+ 'include_dirs': [
+ '<(DEPTH)/v8',
+ '<(DEPTH)/v8/include',
+ ],
+ }],
+ ['pdf_enable_xfa==1', {
+ 'defines': [
+ 'PDF_ENABLE_XFA',
+ ],
+ }],
+ ],
+ },
+ 'conditions': [
+ ['pdf_enable_xfa==1 and OS!="win"', {
+ 'targets': [
+ {
+ 'target_name': 'pdf_fm2js_fuzzer',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../pdfium.gyp:pdfium',
+ ],
+ 'sources': [
+ 'pdf_fm2js_fuzzer.cc',
+ 'unittest_main.cc',
+ ],
+ },
+ {
+ 'target_name': 'pdf_xml_fuzzer',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../pdfium.gyp:pdfium',
+ ],
+ 'sources': [
+ 'pdf_xml_fuzzer.cc',
+ 'unittest_main.cc',
+ ],
+ },
+ ],
+ }],
+ ]
+}