summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/fuzzers.gyp
blob: a65fe1b993827af2ec8033c8a9552ff052e8aa0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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': [
    # FIXME(ochang): Make this work on Mac/Windows.
    ['pdf_enable_xfa==1 and OS=="linux"', {
      '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',
          ],
        },
      ],
    }],
  ],
  # Empty target so that nonxfa builds work.
  'targets': [
    {
      'target_name': 'empty_target',
      'type': 'none',
    }
  ],
}