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: nodejs#24520
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
refack committed Jan 10, 2019
1 parent 69e8be4 commit d12c1cd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions node.gypi
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 d12c1cd

Please sign in to comment.