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

Disable coverage when a C library is not instrumented #1021

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

linzhp
Copy link
Contributor

@linzhp linzhp commented Feb 28, 2023

When building in coverage mode, Bazel's cc_common.configure_features() adds coverage related flags, such as --coverage to the compiler and linker. However, if there is nothing in this library or its deps that are instrumented, we don't need to pass those flags, and avoid unncessary rebuilds.

@linzhp linzhp marked this pull request as draft February 28, 2023 05:46
@linzhp linzhp marked this pull request as ready for review February 28, 2023 05:57
Copy link
Collaborator

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jsharpe jsharpe merged commit 798242e into bazelbuild:main Feb 28, 2023
@linzhp linzhp deleted the coverage branch March 1, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants