Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp33
1 files changed, 33 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index f198bc6cf52..22c270123f1 100644
--- a/node.gyp
+++ b/node.gyp
@@ -13,6 +13,7 @@
'node_use_bundled_v8%': 'true',
'node_shared%': 'false',
'force_dynamic_crt%': 0,
+ 'ossfuzz' : 'false',
'node_module_version%': '',
'node_shared_brotli%': 'false',
'node_shared_zlib%': 'false',
@@ -1170,6 +1171,38 @@
} ],
]
}, # specialize_node_d
+ { # fuzz_url
+ 'target_name': 'fuzz_url',
+ 'type': 'executable',
+ 'dependencies': [
+ '<(node_lib_target_name)',
+ ],
+ 'includes': [
+ 'node.gypi'
+ ],
+ 'include_dirs': [
+ 'src',
+ ],
+ 'defines': [
+ 'NODE_ARCH="<(target_arch)"',
+ 'NODE_PLATFORM="<(OS)"',
+ 'NODE_WANT_INTERNALS=1',
+ ],
+ 'sources': [
+ 'src/node_snapshot_stub.cc',
+ 'src/node_code_cache_stub.cc',
+ 'test/fuzzers/fuzz_url.cc',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'ldflags': [ '-fsanitize=fuzzer' ]
+ }],
+ # Ensure that ossfuzz flag has been set and that we are on Linux
+ [ 'OS!="linux" or ossfuzz!="true"', {
+ 'type': 'none',
+ }],
+ ],
+ }, # fuzz_url
{
'target_name': 'cctest',
'type': 'executable',