Skip to content

Conversation

@droark
Copy link
Contributor

@droark droark commented Dec 24, 2016

Tested on OS X and Linux. Haven't tested on Windows. Can somebody check and see if this is necessary over there? I assume it is.

@gmaxwell
Copy link
Contributor

I think this should be passing --coverage and not -fprofile-arcs as an ldflag (the actual behavior we were missing in the linker -lgcov but --coverage is an alias for "do the right thing for coverage"). Apparently -fprofile-arcs is also doing the same thing right now for linking, but I wouldn't depend on it to be as robust or to pick up future coverage knobs.

I wasn't previously aware we had this option, whenever I previously wanted to generate coverage I'd twiddled the cflags and ldflags myself.

@droark
Copy link
Contributor Author

droark commented Dec 25, 2016

@gmaxwell - Yeah, I didn't know either. It's amazing what a code deep dive will turn up. :) I'm tempted to write a doc with all the config options and PR it.

Anyway, you're right. I somehow missed the lcov web page, which says to use --coverage for both the compiler and linker. Just compiled and linked on OSX (make check passes too), and did a fixup.

@gmaxwell
Copy link
Contributor

ACK

@sipa
Copy link
Member

sipa commented Dec 27, 2016

utACK

@btcdrak
Copy link
Contributor

btcdrak commented Dec 30, 2016

utACK

@jonasschnelli
Copy link
Contributor

utACK e2b5c98

@jonasschnelli jonasschnelli merged commit e2b5c98 into bitcoin:master Dec 30, 2016
jonasschnelli added a commit that referenced this pull request Dec 30, 2016
e2b5c98 Fix linker error when configured with --enable-lcov (Douglas Roark)
codablock pushed a commit to codablock/dash that referenced this pull request Jan 18, 2018
e2b5c98 Fix linker error when configured with --enable-lcov (Douglas Roark)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
e2b5c98 Fix linker error when configured with --enable-lcov (Douglas Roark)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 26, 2019
e2b5c98 Fix linker error when configured with --enable-lcov (Douglas Roark)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants