summaryrefslogtreecommitdiff
path: root/node.gypi
diff options
context:
space:
mode:
authorYihong Wang <yh.wang@ibm.com>2018-01-26 22:35:35 -0800
committerMichael Dawson <michael_dawson@ca.ibm.com>2018-02-02 10:07:25 -0500
commita89d215b79cc1aa300e25be13aa2489a2322f1ad (patch)
tree39960f553eba995eed3f311a07932b82ab471d5e /node.gypi
parentfca1c557ac426c10215b9a834236a10ea96ecb2c (diff)
downloadnode-new-a89d215b79cc1aa300e25be13aa2489a2322f1ad.tar.gz
build: fix coverage build
After adding the node_lib target in node.gyp, most of the node source files are moved to that target. When coverage option is enabled, corresponding cflags and ldflags are needed in that target as well. gcovr also needs to check .gcda data for both node and node_lib. PR-URL: https://github.com/nodejs/node/pull/18409 Fixes: https://github.com/nodejs/node/issues/18402 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'node.gypi')
-rw-r--r--node.gypi17
1 files changed, 6 insertions, 11 deletions
diff --git a/node.gypi b/node.gypi
index 49384db0a5..d01004ce8c 100644
--- a/node.gypi
+++ b/node.gypi
@@ -184,25 +184,20 @@
],
}],
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"'
- ' and coverage=="false" and force_load=="true"', {
+ ' and force_load=="true"', {
'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" and force_load=="true"', {
- 'ldflags': [ '-Wl,-z,noexecstack',
- '-Wl,--whole-archive <(v8_base)',
- '-Wl,--no-whole-archive',
- '--coverage',
+ [ 'OS in "mac freebsd linux" and node_shared=="false"'
+ ' and coverage=="true"', {
+ 'ldflags': [ '--coverage',
'-g',
'-O0' ],
- 'cflags': [ '--coverage',
+ 'cflags': [ '--coverage',
'-g',
'-O0' ],
- 'cflags!': [ '-O3' ]
- }],
- [ 'OS=="mac" and node_shared=="false" and coverage=="true"', {
+ 'cflags!': [ '-O3' ],
'xcode_settings': {
'OTHER_LDFLAGS': [
'--coverage',