Skip to content

Commit

Permalink
tools: fix c++ code coverage on macOS
Browse files Browse the repository at this point in the history
Recent libtool on macOS does not support the --coverage flag that was
being passed through in the final linking stage.
This change patches gyp-mac-tool to not pass the --coverage flag through
to libtool. It is now possible to generate code coverage for src/ on
macOS.

Fixes: nodejs#19057
  • Loading branch information
evanlucas committed Oct 31, 2018
1 parent df7f629 commit bd692c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/gyp/pylib/gyp/xcode_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,8 @@ def GetLibtoolflags(self, configname):
libtoolflags = []

for libtoolflag in self._Settings().get('OTHER_LDFLAGS', []):
if libtoolflag == "--coverage":
continue
libtoolflags.append(libtoolflag)
# TODO(thakis): ARCHS?

Expand Down

0 comments on commit bd692c4

Please sign in to comment.