blob: c7c4cb47ba29557902b9f27a17753bd0e91ad75a [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001# Copyright 2016 the V8 project 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{
6 'variables': {
7 'v8_code': 1,
8 },
Ben Murdochc5610432016-08-08 18:44:38 +01009 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
Ben Murdoch097c5b22016-05-18 11:27:45 +010010 'targets': [
11 {
Ben Murdoch61f157c2016-09-16 13:49:30 +010012 'target_name': 'v8_simple_json_fuzzer',
Ben Murdoch097c5b22016-05-18 11:27:45 +010013 'type': 'executable',
14 'dependencies': [
15 'json_fuzzer_lib',
16 ],
17 'include_dirs': [
18 '../..',
19 ],
20 'sources': [
21 'fuzzer.cc',
22 ],
23 },
24 {
25 'target_name': 'json_fuzzer_lib',
26 'type': 'static_library',
27 'dependencies': [
28 'fuzzer_support',
29 ],
30 'include_dirs': [
31 '../..',
32 ],
33 'sources': [ ### gcmole(all) ###
34 'json.cc',
35 ],
36 },
37 {
Ben Murdoch61f157c2016-09-16 13:49:30 +010038 'target_name': 'v8_simple_parser_fuzzer',
Ben Murdoch097c5b22016-05-18 11:27:45 +010039 'type': 'executable',
40 'dependencies': [
41 'parser_fuzzer_lib',
42 ],
43 'include_dirs': [
44 '../..',
45 ],
46 'sources': [
47 'fuzzer.cc',
48 ],
49 },
50 {
51 'target_name': 'parser_fuzzer_lib',
52 'type': 'static_library',
53 'dependencies': [
54 'fuzzer_support',
55 ],
56 'include_dirs': [
57 '../..',
58 ],
59 'sources': [ ### gcmole(all) ###
60 'parser.cc',
61 ],
62 },
63 {
Ben Murdoch61f157c2016-09-16 13:49:30 +010064 'target_name': 'v8_simple_regexp_fuzzer',
Ben Murdoch097c5b22016-05-18 11:27:45 +010065 'type': 'executable',
66 'dependencies': [
67 'regexp_fuzzer_lib',
68 ],
69 'include_dirs': [
70 '../..',
71 ],
72 'sources': [
73 'fuzzer.cc',
74 ],
75 },
76 {
77 'target_name': 'regexp_fuzzer_lib',
78 'type': 'static_library',
79 'dependencies': [
80 'fuzzer_support',
81 ],
82 'include_dirs': [
83 '../..',
84 ],
85 'sources': [ ### gcmole(all) ###
86 'regexp.cc',
87 ],
88 },
89 {
Ben Murdoch61f157c2016-09-16 13:49:30 +010090 'target_name': 'v8_simple_wasm_fuzzer',
Ben Murdochda12d292016-06-02 14:46:10 +010091 'type': 'executable',
92 'dependencies': [
93 'wasm_fuzzer_lib',
94 ],
95 'include_dirs': [
96 '../..',
97 ],
98 'sources': [
99 'fuzzer.cc',
100 ],
101 },
102 {
103 'target_name': 'wasm_fuzzer_lib',
104 'type': 'static_library',
105 'dependencies': [
106 'fuzzer_support',
107 ],
108 'include_dirs': [
109 '../..',
110 ],
111 'sources': [ ### gcmole(all) ###
112 'wasm.cc',
113 ],
114 },
115 {
Ben Murdoch61f157c2016-09-16 13:49:30 +0100116 'target_name': 'v8_simple_wasm_asmjs_fuzzer',
Ben Murdochda12d292016-06-02 14:46:10 +0100117 'type': 'executable',
118 'dependencies': [
119 'wasm_asmjs_fuzzer_lib',
120 ],
121 'include_dirs': [
122 '../..',
123 ],
124 'sources': [
125 'fuzzer.cc',
126 ],
127 },
128 {
129 'target_name': 'wasm_asmjs_fuzzer_lib',
130 'type': 'static_library',
131 'dependencies': [
132 'fuzzer_support',
133 ],
134 'include_dirs': [
135 '../..',
136 ],
137 'sources': [ ### gcmole(all) ###
138 'wasm-asmjs.cc',
139 ],
140 },
141 {
Ben Murdoch097c5b22016-05-18 11:27:45 +0100142 'target_name': 'fuzzer_support',
143 'type': 'static_library',
144 'dependencies': [
Ben Murdochc5610432016-08-08 18:44:38 +0100145 '../../src/v8.gyp:v8_libplatform',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100146 ],
147 'include_dirs': [
148 '../..',
149 ],
150 'sources': [ ### gcmole(all) ###
151 'fuzzer-support.cc',
152 'fuzzer-support.h',
153 ],
154 'conditions': [
155 ['component=="shared_library"', {
156 # fuzzers can't be built against a shared library, so we need to
157 # depend on the underlying static target in that case.
Ben Murdochc5610432016-08-08 18:44:38 +0100158 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
Ben Murdoch097c5b22016-05-18 11:27:45 +0100159 }, {
Ben Murdochc5610432016-08-08 18:44:38 +0100160 'dependencies': ['../../src/v8.gyp:v8'],
Ben Murdoch097c5b22016-05-18 11:27:45 +0100161 }],
162 ],
163 },
164 ],
165 'conditions': [
166 ['test_isolation_mode != "noop"', {
167 'targets': [
168 {
169 'target_name': 'fuzzer_run',
170 'type': 'none',
171 'dependencies': [
Ben Murdoch61f157c2016-09-16 13:49:30 +0100172 'v8_simple_json_fuzzer',
173 'v8_simple_parser_fuzzer',
174 'v8_simple_regexp_fuzzer',
175 'v8_simple_wasm_fuzzer',
176 'v8_simple_wasm_asmjs_fuzzer',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100177 ],
178 'includes': [
Ben Murdochc5610432016-08-08 18:44:38 +0100179 '../../gypfiles/isolate.gypi',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100180 ],
181 'sources': [
182 'fuzzer.isolate',
183 ],
184 },
185 ],
186 }],
187 ],
188}