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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Anna Henningsen 2017-04-13 22:31:44 +02:00 коммит произвёл Refael Ackermann
Родитель 3d2181c5f0
Коммит ea44b8b283
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -325,7 +325,8 @@
'-O0' ],
'cflags': [ '--coverage',
'-g',
'-O0' ]
'-O0' ],
'cflags!': [ '-O3' ]
}],
[ 'OS=="sunos"', {
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],