Skip to content
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

Add a workaround for gcov-based coverage with clang #5040

Closed
wants to merge 3 commits into from

Conversation

ulfjack
Copy link
Contributor

@ulfjack ulfjack commented Apr 17, 2018

  • Allow overriding the gcov tool with the GCOV env variable in cc_configure
  • Symlink the GCOV tool in collect-coverage.sh to a temporary location with
    the name "gcov"

This allows the user to specify GCOV=llvm-cov in the environment of a bazel
build, which then leads to cc_configure picking up llvm-cov in the crosstool,
which the collect-coverage.sh script then uses as "gcov".

On linux distributions, the gcov tool does not generally work with clang
coverage output, so this provides at least a workaround for running coverage
with clang (by setting the GCOV env variable).

- Allow overriding the gcov tool with the GCOV env variable in cc_configure
- Symlink the GCOV tool in collect-coverage.sh to a temporary location with
  the name "gcov"

This allows the user to specify GCOV=llvm-cov in the environment of a bazel
build, which then leads to cc_configure picking up llvm-cov in the crosstool,
which the collect-coverage.sh script then uses as "gcov".

On linux distributions, the gcov tool does not generally work with clang
coverage output, so this provides at least a workaround for running coverage
with clang (by setting the GCOV env variable).
@ulfjack ulfjack requested a review from hlopko April 17, 2018 17:11
@bazel-io bazel-io closed this in 9566f67 Apr 19, 2018
@ulfjack ulfjack deleted the clang-gcov branch May 15, 2018 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants