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

fix: add --coverage-target-only, to use rustflags only for target #167

Merged
merged 1 commit into from
May 21, 2022

Conversation

haraldh
Copy link
Contributor

@haraldh haraldh commented May 19, 2022

Use CARGO_TARGET_{target}_RUSTFLAGS rather than RUSTFLAGS,
if --target <TRIPLE> and --coverage-target-only is specified.

This is important, if the project uses multiple targets via the cargo
bindeps feature, and not all targets can use instrument-coverage,
e.g. a microkernel, or an embedded binary.

Signed-off-by: Harald Hoyer harald@profian.com

@taiki-e
Copy link
Owner

taiki-e commented May 20, 2022

Thanks!

CI is not starting somehow, so I'll close and immediately reopen this PR to fix it.

@taiki-e taiki-e closed this May 20, 2022
@taiki-e taiki-e reopened this May 20, 2022
Use `CARGO_TARGET_{target}_RUSTFLAGS` rather than `RUSTFLAGS`,
if `--target <TRIPLE>` and `--coverage-target-only` is specified.

This is important, if the project uses multiple targets via the cargo
`bindeps` feature, and not all targets can use `instrument-coverage`,
e.g. a microkernel, or an embedded binary.

Signed-off-by: Harald Hoyer <harald@profian.com>
@haraldh
Copy link
Contributor Author

haraldh commented May 20, 2022

1 workflow awaiting approval
First-time contributors need a maintainer to approve running workflows. Learn more.

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented May 21, 2022

Build succeeded:

@bors bors bot merged commit 6db3a02 into taiki-e:main May 21, 2022
bstrie added a commit to bstrie/enarx that referenced this pull request May 23, 2022
This uses the new flag added in taiki-e/cargo-llvm-cov#167

Signed-off-by: bstrie <865233+bstrie@users.noreply.github.com>
enarxbot pushed a commit to enarx/enarx that referenced this pull request May 23, 2022
This uses the new flag added in taiki-e/cargo-llvm-cov#167

Signed-off-by: bstrie <865233+bstrie@users.noreply.github.com>
@taiki-e
Copy link
Owner

taiki-e commented May 24, 2022

Published in 0.4.1.

@haraldh
Copy link
Contributor Author

haraldh commented May 24, 2022

Thank you!

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