Skip to content

Commit

Permalink
build: disable -O3 for C++ coverage
Browse files Browse the repository at this point in the history
The `cflags` for `--coverage` included `-O0` so far, but that was
overridden by a later `-O3`. Resolve that by adding
`'cflags!': [ '-O3' ]` and increase coverage accuracy.

Ref: https://coverage.nodejs.org/
PR-URL: #12406
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and gibfahn committed Jun 18, 2017
1 parent f359682 commit ff637f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
'-O0' ],
'cflags': [ '--coverage',
'-g',
'-O0' ]
'-O0' ],
'cflags!': [ '-O3' ]
}],
[ 'OS=="sunos"', {
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
Expand Down

0 comments on commit ff637f1

Please sign in to comment.