Skip to content

Commit ea44b8b

Browse files
addaleaxrefack
authored andcommitted
build: disable -O3 for C++ coverage
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3d2181c commit ea44b8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

node.gypi

+2-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@
325325
'-O0' ],
326326
'cflags': [ '--coverage',
327327
'-g',
328-
'-O0' ]
328+
'-O0' ],
329+
'cflags!': [ '-O3' ]
329330
}],
330331
[ 'OS=="sunos"', {
331332
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],

0 commit comments

Comments
 (0)