Make it possible to use llvm-cov with `bazel coverage`
The fact that llvm-cov and llvm-profdata are not set seems to trip up the external/bazel_tools/tools/test/collect_cc_coverage.sh script resulting in empty .dat files.
To solve the issue we implement something similar to what's done in rules_cc.
After these changes bazel coverage <test target> no longer produces empty .dat files.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.