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

Support coverage of C/C++ code linked to Rust library/binary #194

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jul 18, 2022

Set CC, CXX, LLVM_COV, and LLVM_PROFDATA environment variables to Clang/LLVM compatible with the LLVM version used in rustc, and run cargo-llvm-cov with --include-ffi flag.

CC=<clang-path> \
CXX=<clang++-path> \
LLVM_COV=<llvm-cov-path> \
LLVM_PROFDATA=<llvm-profdata-path> \
  cargo llvm-cov --lcov --include-ffi

Closes #192

@taiki-e
Copy link
Owner Author

taiki-e commented Jul 18, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 18, 2022

Build succeeded:

@bors bors bot merged commit 5f5c947 into main Jul 18, 2022
@bors bors bot deleted the ffi branch July 18, 2022 06:46
bors bot added a commit that referenced this pull request Jul 20, 2022
196: Fix handling of existing CFLAGS/CXXFLAGS in --include-ffi r=taiki-e a=taiki-e

follow-up of #194

Co-authored-by: Taiki Endo <te316e89@gmail.com>
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.

Add support for code coverage in C/C++ code linked in to Rust library
1 participant