diff --git a/configure.py b/configure.py index 8b78eb006ec..4d36350c378 100755 --- a/configure.py +++ b/configure.py @@ -1438,7 +1438,9 @@ def configure_node(o): o['variables']['node_use_node_snapshot'] = b( not cross_compiling and not options.shared) - if options.without_node_code_cache or options.without_node_snapshot or options.node_builtin_modules_path: + # Do not use code cache when Node.js is built for collecting coverage of itself, this allows more + # precise coverage for the JS built-ins. + if options.without_node_code_cache or options.without_node_snapshot or options.node_builtin_modules_path or options.coverage: o['variables']['node_use_node_code_cache'] = 'false' else: # TODO(refack): fix this when implementing embedded code-cache when cross-compiling.