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 <anna@addaleax.net>
  • Loading branch information
refack authored and BethGriggs committed Feb 12, 2019
1 parent 7048cba commit c57008e
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 @@ -269,25 +269,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 c57008e

Please sign in to comment.