diff options
author | Wayne Andrews <andreww@uk.ibm.com> | 2016-10-14 13:33:25 +0100 |
---|---|---|
committer | Michael Dawson <michael_dawson@ca.ibm.com> | 2016-11-08 09:33:40 -0500 |
commit | 5d9d41597251f79a0c64a3c16957f638705f3db6 (patch) | |
tree | 47591f9844400d787b2fc1fb89d649c12acbd7f1 /node.gyp | |
parent | a41b41a5409e41907982504dc0d6fd0c8c7968f9 (diff) | |
download | android-node-v8-5d9d41597251f79a0c64a3c16957f638705f3db6.tar.gz android-node-v8-5d9d41597251f79a0c64a3c16957f638705f3db6.tar.bz2 android-node-v8-5d9d41597251f79a0c64a3c16957f638705f3db6.zip |
build: Add option to compile for coverage reports
Add --coverage option to configure to support
compiling for generation of C based coverage reports
PR-URL: https://github.com/nodejs/node/pull/9463
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -549,11 +549,22 @@ 'NODE_PLATFORM="sunos"', ], }], - [ '(OS=="freebsd" or OS=="linux") and node_shared=="false"', { + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="false"', { 'ldflags': [ '-Wl,-z,noexecstack', '-Wl,--whole-archive <(V8_BASE)', '-Wl,--no-whole-archive' ] }], + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="true"', { + 'ldflags': [ '-Wl,-z,noexecstack', + '-Wl,--whole-archive <(V8_BASE)', + '-Wl,--no-whole-archive', + '--coverage', + '-g', + '-O0' ], + 'cflags': [ '--coverage', + '-g', + '-O0' ] + }], [ 'OS=="sunos"', { 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], }], |