-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add c++ coverage support on macOS #16163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubber stampy LGTM. Looked it over, didn't see anything that was problematic, but cannot test on macos at the moment.
Makefile
Outdated
@@ -34,6 +35,10 @@ ifdef DISABLE_V8_I18N | |||
V8_BUILD_OPTIONS += i18nsupport=off | |||
endif | |||
|
|||
ifeq ($(OSTYPE), darwin) | |||
GCOV = xcrun llvm-cov gcov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiniest of nits: two space indent like the lines above.
I am still seeing 0% C++ Coverage with this patch on MacOS 10.12.4... |
@joyeecheung That was happening to me before too. I had to completely remove the |
acb5cb3
to
d261d72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good to see this get added.
ping @joyeecheung, did you get a chance to try this again? |
@evanlucas I have tried before with |
@joyeecheung are you using ccache by chance? |
@evanlucas No, I don't have ccache set up. I tried again but still no luck :( Maybe this has something to do with the version of llvm toolchain that I am using?
|
@joyeecheung it very well could:
Ah, are you using Xcode's cli tools or did you manually install everything? |
@evanlucas Ah, I seemed to forget to rerun
|
@joyeecheung awesome thanks! I'll land today then! Thanks! |
macOS requires passing the --coverage flag in OTHER_LDFLAGS and OTHER_CFLAGS in xcode_settings. PR-URL: nodejs#16163 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
d261d72
to
a078584
Compare
Landed in a078584. Thanks! |
macOS requires passing the --coverage flag in OTHER_LDFLAGS and OTHER_CFLAGS in xcode_settings. PR-URL: #16163 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
macOS requires passing the --coverage flag in OTHER_LDFLAGS and OTHER_CFLAGS in xcode_settings. PR-URL: nodejs/node#16163 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Should this be backported to |
Not really necessary IMO, so I'll add the label |
macOS requires passing the --coverage flag in OTHER_LDFLAGS and OTHER_CFLAGS in xcode_settings. PR-URL: nodejs/node#16163 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
macOS requires passing the --coverage flag in OTHER_LDFLAGS and
OTHER_CFLAGS in xcode_settings.
Checklist
Affected core subsystem(s)
build