Skip to content

Commit

Permalink
build: fix c++ code coverage on macOS
Browse files Browse the repository at this point in the history
PR-URL: #24520
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
refack authored and BridgeAR committed Dec 5, 2018
1 parent be54dc0 commit 3fe4498
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -274,25 +274,28 @@
'-Wl,--whole-archive <(v8_base)',
'-Wl,--no-whole-archive' ]
}],
[ 'OS in "mac freebsd linux" and node_shared=="false"'
' and coverage=="true"', {
[ 'coverage=="true" and node_shared=="false" and OS in "mac freebsd linux"', {
'cflags!': [ '-O3' ],
'ldflags': [ '--coverage',
'-g',
'-O0' ],
'cflags': [ '--coverage',
'-g',
'-O0' ],
'cflags!': [ '-O3' ],
'xcode_settings': {
'OTHER_LDFLAGS': [
'--coverage',
],
'OTHER_CFLAGS+': [
'OTHER_CFLAGS': [
'--coverage',
'-g',
'-O0'
],
}
},
'conditions': [
[ '_type=="executable"', {
'xcode_settings': {
'OTHER_LDFLAGS': [ '--coverage', ],
},
}],
],
}],
[ 'OS=="sunos"', {
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
Expand Down

0 comments on commit 3fe4498

Please sign in to comment.